After investigating some more, I've discovered that MPNowPlayingInfoCenter in the AssemblyBrowser houses the following:
[CompilerGenerated]
public static MPNowPlayingInfoCenter DefaultCenter {
[Export ("defaultCenter")]
get;
}
However, in the latest version of iOS, "defaultCenter" has been renamed to "default". So I'm going to guess that it's an iOS version difference, although I have no way of checking that this is the case.
JGoldbergerUSMember, Forum Administrator, Xamarin Team, UniversityXamurai
I do not see that renaming in the iOS framework. I note that in Swift there is a method default on the type MPNowPlayingInfoCenter to get the default info center, but in Obj-C it is still a field called defaultCenter. So I have no idea why that is returning null for you. I just did a quick test and an MPNowPlayingInfoCenter object was returned on both a device (10.3.1) and simulators (10.3 and 9.3).
Can you share some sample code that is not working on the simulator?
I apologise; For some reason deleting and re-cloning the project caused it to no longer be null, so something very odd must have been going on. Even a clean in the original project did not solve it, and I am on the exact same commit. Regardless, I suppose this is invalid.
Posts
After investigating some more, I've discovered that MPNowPlayingInfoCenter in the AssemblyBrowser houses the following:
[CompilerGenerated]
public static MPNowPlayingInfoCenter DefaultCenter {
[Export ("defaultCenter")]
get;
}
However, in the latest version of iOS, "defaultCenter" has been renamed to "default". So I'm going to guess that it's an iOS version difference, although I have no way of checking that this is the case.
Is there perhaps some workaround I could try?
Bump
I do not see that renaming in the iOS framework. I note that in Swift there is a method
default
on the type MPNowPlayingInfoCenter to get the default info center, but in Obj-C it is still a field calleddefaultCenter
. So I have no idea why that is returning null for you. I just did a quick test and anMPNowPlayingInfoCenter
object was returned on both a device (10.3.1) and simulators (10.3 and 9.3).Can you share some sample code that is not working on the simulator?
I apologise; For some reason deleting and re-cloning the project caused it to no longer be null, so something very odd must have been going on. Even a clean in the original project did not solve it, and I am on the exact same commit. Regardless, I suppose this is invalid.