我正在尝试将 Apple Music 集成到我的应用程序中,直到今天早上我才设法使其完美运行。
更新到 iOS 9.3.2 后,一切都不一样了:
权限系统的工作原理相同(SK云服务控制器 https://developer.apple.com/library/ios/documentation/StoreKit/Reference/SKCloudServiceController_Class/)来检索授权状态 https://developer.apple.com/library/ios/documentation/StoreKit/Reference/SKCloudServiceController_Class/#//apple_ref/c/tdef/SKCloudServiceAuthorizationStatus and 能力 https://developer.apple.com/library/ios/documentation/StoreKit/Reference/SKCloudServiceController_Class/#//apple_ref/c/tdef/SKCloudServiceCapability用户的。
但是,那MP音乐播放器控制器 https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMusicPlayerController_ClassReference/使用新的 iOS 版本时行为不一样,让我解释一下:
在iOS 9.3.1上,如果我在playerController.setQueueWithStoreIDs(:_)中设置曲目后调用playerController.play()方法,我会立即收到MPMusicPlayerControllerNowPlayingItemDidChangeNotification https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMusicPlayerController_ClassReference/#//apple_ref/c/data/MPMusicPlayerControllerNowPlayingItemDidChangeNotification与playerController.indexOfNowPlayingItem等于0音乐正在播放normaly.
在iOS 9.3.2上,如果我在playerController.setQueueWithStoreIDs(:_)中设置曲目后调用playerController.play()方法,我会立即收到MPMusicPlayerControllerNowPlayingItemDidChangeNotification https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMusicPlayerController_ClassReference/#//apple_ref/c/data/MPMusicPlayerControllerNowPlayingItemDidChangeNotification与playerController.indexOfNowPlayingItem等于NS未找到和音乐不玩.
我在 iPhone 6、6s、6s+ 和 5S 上检查了此行为。在 iOS 9.3.1 上一切正常,而在 9.3.2 中该行为极不可能成功(成功率约为 1%)。
我还查找了一些已经在商店中提供 Apple Music 集成的应用程序,结果是相同的,这些应用程序在 iOS 9.3.2 上无法正常工作。这就是我向 Apple 填写错误报告的原因。
如果有人能解决这个问题,我很想听听!
!!!更新 !!! :
我刚刚注意到MP音乐播放器控制器 https://developer.apple.com/library/ios/documentation/MediaPlayer/Reference/MPMusicPlayerController_ClassReference/.setQueueWithStoreIDs(_:) 只是从文档中消失今天早上:哦,它自 2016 年 3 月 21 日起就在那里!
依然是THERE https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS9_3.html
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)