Not allowed by skipping filter predicate application

After starting on the iOS10 device, I get the following output:

[MC] Reading from public user settings.

[SDKPlayback] MPMusicPlayerController] MPMusicPlayerController: the server is down, delay registration

[SDKLibrary] Not allowed, skipping filter predicate application

The application plays music from the user library and therefore must request permission, so I updated info.plist with the necessary key lines for NSAppleMusicUsageDescription, but the application crashes as soon as the predicate is called. When the application is stopped and the launch screen disappears, the permission window finally displays. If I touch permission, subsequent launches will work fine.

My question is: does the "server not working" error have any action with a permission window that does not appear? If so, how do I get started?

+4
source share
1 answer

So, the way MPMusicPlayerController works:

  • You must have a key in Info.plist, as you already know.

  • In your code check authorization with MPMediaLibrary.authorizationStatus.

  • If you do not have authorization, you request authorization using MPMediaLibrary.requestAuthorization. You cannot act until you receive authorization. Be careful because the call is asynchronous and termination is called in the background thread.

  • MPMediaItemCollection setQueue(with:), play.

+9

Source: https://habr.com/ru/post/1661384/


All Articles