gpt4 book ai didi

ios - Xcode 11 beta -playbackState 仅在 iOS 13.0 或更高版本中可用

转载 作者:行者123 更新时间:2023-12-01 23:00:52 25 4
gpt4 key购买 nike

我收到错误:“playbackState”仅在 iOS 13.0 或更高版本中可用

但是我的 iOS 11 应用程序中使用了 MPNowPlayingInfoCenter.playbackState

这是 iOS 13 的问题吗?我现在可以处理吗?

在 iOS11 中:

@available(iOS 5.0, *)
open class MPNowPlayingInfoCenter : NSObject {

open class func `default`() -> MPNowPlayingInfoCenter

open var nowPlayingInfo: [String : Any]?

open var playbackState: MPNowPlayingPlaybackState
}

现在在 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
}

最佳答案

我向 Apple 提交了错误报告,以下是 Apple 工程部门的回复:

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.

关于ios - Xcode 11 beta -playbackState 仅在 iOS 13.0 或更高版本中可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57037569/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com