I'm getting error: 'playbackState' is only available in iOS 13.0 or newer
but MPNowPlayingInfoCenter.playbackState
was used in my app for iOS 11.
This is issue of iOS 13? Can I handle it now?
was in iOS11:
@available(iOS 5.0, *)
open class MPNowPlayingInfoCenter : NSObject {
open class func `default`() -> MPNowPlayingInfoCenter
open var nowPlayingInfo: [String : Any]?
open var playbackState: MPNowPlayingPlaybackState
}
now in iOS 13:
@available(iOS 5.0, *)
open class MPNowPlayingInfoCenter : NSObject {
open class func `default`() -> MPNowPlayingInfoCenter
open var nowPlayingInfo: [String : Any]?
@available(iOS 13.0, *)
open var playbackState: MPNowPlayingPlaybackState
}
I filed a bug report to Apple and below is the response from Apple Engineering:
This API is only supported on macOS and Catalyst. It was mistakenly marked available in a previous release, but it has been corrected. We were requested to not mark this API as available specifically for Catalyst, but macOS platform is the only place where this API works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With