jjzjj

beginReceivingRemoteControlEvents

全部标签

ios - 在后台调用 beginReceivingRemoteControlEvents

是否可以在后台调用beginReceivingRemoteControlEvents?有没有人遇到过类似情况?到目前为止,我得出的结论是我无法更改类别并在后台继续使用Remote。当我在类别之间切换时,例如AVAudioSessionCategoryPlayback或AVAudioSessionCategoryPlayAndRecord,AudioSession被停用,我必须再次调用beginReceivingRemoteControlEvents。当这在前台完成时,它工作得很好。当它在后台完成时,新的beginReceivingRemoteControlEvents似乎不起作用。如果

ios - beginReceivingRemoteControlEvents 不触发 Apple Music 的事件

我正在从我的应用程序播放AppleMusic,Apple音乐播放器代码如下--(void)submitAppleMusicTrackWithProductID:(NSString*)productID//productIDinUSisthelastnumbersafteri=intheshareURLfromAppleMusic{[SKCloudServiceControllerrequestAuthorization:^(SKCloudServiceAuthorizationStatusstatus){NSLog(@"statusis%ld",(long)status);SKClou

ios - 使用 beginReceivingRemoteControlEvents

我看到人们在管理AudioSession时使用:[[UIApplicationsharedApplication]beginReceivingRemoteControlEvents];来处理远程控制事件。我的问题:此代码是否只能在UIViewController类或AppDelegate类中使用?因为我看到互联网上的每个人都在两个类(class)之一中使用它。我可以在不是UIViewController或AppDelegate子类的类中使用它吗? 最佳答案 对于只想在特定状态下处理远程控制事件的应用程序——例如,准备好播放媒体,而不

ios - 使用 beginReceivingRemoteControlEvents

我看到人们在管理AudioSession时使用:[[UIApplicationsharedApplication]beginReceivingRemoteControlEvents];来处理远程控制事件。我的问题:此代码是否只能在UIViewController类或AppDelegate类中使用?因为我看到互联网上的每个人都在两个类(class)之一中使用它。我可以在不是UIViewController或AppDelegate子类的类中使用它吗? 最佳答案 对于只想在特定状态下处理远程控制事件的应用程序——例如,准备好播放媒体,而不