Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
I have a code that is working on iOS, and as the same API is used on Mac it should work without the problem, but MediaPlayer.MPNowPlayingInfo is not implemented on Xamarin.Mac at all.
Probably as a result of that, there is also no MediaPlayer.MPNowPlayingInfoCenter.DefaultCenter.NowPlaying at all (which should return MediaPlayer.MPNowPlayingInfo) so for now I won't file the separate bug.
Confirmed it seems we need to audit this API to expose the strong dict in macOS too
Support for `MPNowPlayingInfoCenter` (which is what I think you're referring) was added. The type is decorated with `[Mac (10,12,2, onlyOn64: true)]`
However there is not such thing as `MediaPlayer.MPNowPlayingInfoCenter.DefaultCenter.NowPlaying` and no `MediaPlayer.MPNowPlayingInfo`, typos ?
Please try again with the latest XM (3.4 or 3.6 in beta) and let us know if something else is missing (it should be complete as I just reviewed this for Xcode9 API).
I'll take care of updating the strong dictionary like Alex mentioned in comment #1 (as part of the Xcode9 update)
I was referring to what I was referring. Check your implementation for iOS, those things do exist. I can't find the links in the online documentation, but if you write this code it will work (and actually it can't work any other way):
var info = new MediaPlayer.MPNowPlayingInfo();
MediaPlayer.MPNowPlayingInfoCenter.DefaultCenter.NowPlaying = info;
As it is exactly the same API as on iOS you should try to make it uniform.
Sorry, I see it now. It's a manual helper (not generated bindings).
This will be enabled in a future release of XM (it's part of comment #1) -starting with XM 3.99 previews as this needs to be updated with new Xcode9 API.
PR merged in https://github.com/xamarin/xamarin-macios/commit/8c7b776d86246c261e916c73fa6aca0cbdba91dd
The code will be in XM 3.99 preview 4 (next week)