0

In iOS 10, if an app accesses the music library, an Alert will be presented asking if the user gives permission for this access. This Alert is not part of the App. Is there some notification mechanism so that the App can be informed (a) that the Alert has been presented and (b) when the user has responded one way or the other?

The only work-around I have found is to relaunch the App after giving permission - not a very satisfactory way to deal with this.

mmm
  • 65
  • 10

1 Answers1

2

Before accessing, request authorization yourself. See MPMediaLibrary.requestAuthorization(). It has a callback with the resulting status. You can also check the authorizationStatus() directly.

Rob Napier
  • 286,113
  • 34
  • 456
  • 610