Tag: 苹果音乐

beginReceivingRemoteControlEvents不触发Apple Music的事件

我从我的应用程序播放苹果音乐,苹果音乐播放器的代码是 – -(void) submitAppleMusicTrackWithProductID: (NSString *) productID // productID in US is the last numbers after i= in the share URL from Apple Music { [SKCloudServiceController requestAuthorization:^(SKCloudServiceAuthorizationStatus status) { NSLog(@"status is %ld", (long)status); SKCloudServiceController *cloudServiceController; cloudServiceController = [[SKCloudServiceController alloc] init]; [cloudServiceController requestCapabilitiesWithCompletionHandler:^(SKCloudServiceCapability capabilities, NSError * _Nullable error) { NSLog(@"%lu %@", (unsigned long)capabilities, error); if (capabilities […]

iOS 9.3.2打破MPMusicPlayerController

我正在尝试将Apple Music整合到我的应用程序中,直到今天上午,我才完成了完美的工作。 更新到iOS 9.3.2后,没有什么是相同的: 权限系统工作相同( SKCloudServiceController )来检索用户的授权状态和能力 。 但是,使用新版本的iOS版本, MPMusicPlayerController的performance不尽相同,请让我解释一下: 在iOS 9.3.1上,如果我在playerController.setQueueWithStoreIDs(:_)中设置好音轨后调用playerController.play()方法,我立即收到MPlayer的PlayerController.indexOfNowPlayingItem等于0的MPMusicPlayerControllerNowPlayingItemDidChangeNotification,音乐正常播放。 在iOS 9.3.2上,如果我在playerController.setQueueWithStoreIDs(:_)中设置了我的音轨后调用了playerController.play()方法,我立即收到MPlayer的PlayerController.indexOfNowPlayingItem等于NSNotFound并且音乐没有播放的MPMusicPlayerControllerNowPlayingItemDidChangeNotification。 我在iPhone 6,6s,6s +和5S上检查了这种行为。 在iOS 9.3.1上,一切正常,行为在9.3.2中不可能成功(它的工作原理是1%的时间)。 我也查了一些已经在Store上提供Apple Music集成的应用程序,结果是一样的,应用程序在iOS 9.3.2上不能正常工作。 这就是为什么我向苹果公司提交错误报告的原因。 如果有人能解决这个问题,我很乐意听到! ! 更新! : 我刚刚注意到, MPMusicPlayerController .setQueueWithStoreIDs(_ :)刚刚从文档中消失了 :O,从2016年3月21日起就在那里! 它仍然在那里

由第三方应用程序播放苹果音乐歌曲

我在我的应用程序中使用iTunes Search API并使用应用程序播放应用程序内的previewUrl歌曲 AVPlayer 如果用户想要播放完整的歌曲,他/她只需要从iTunes Store购买歌曲,那么他/她可以从应用程序播放完整的歌曲。 由于苹果发布了苹果音乐 &试听或正式会员的全部和允许播放完整的歌曲,是否有可能播放苹果音乐完整的歌曲从我的应用程序如Previewurl通过使用 avplayer或mpmovieplayercontroller