MPMediaPickerController shows an empty screen on iOS10

I am trying to port my apps to iOS 10, including the visualization of a

MPMediaPickerController
by means of the following code:
@IBAction func handleBrowserTapped(_ sender: AnyObject){
        let pickerController = MPMediaPickerController(mediaTypes: .music)
        pickerController.prompt = NSLocalizedString("Add pieces to queue", comment:"");
        pickerController.allowsPickingMultipleItems=true;
        pickerController.delegate=MPMusicPlayerControllerSingleton.sharedController();
        self.present(pickerController, animated:true, completion:{
            MPMusicPlayerControllerSingleton.sharedController().storeQueue()
        })
    }

Yet all that appears on the screen is a totally while screen, differently from the previous iOS versions. The block is called and so the picker presentation seems to succeed. What could be the problem?

Accepted Reply

Actually the just released beta version correctly opens the music browser after funnily asking the authorization to access Apple Music.

Replies

I am having the same problem. I also see that immediately I am getting the MPMediaPickerControllerDelegate "mediaPickerDidCancel:" method getting called.

Anyone having luck with it?

Running iOS 10 Beta 2 on a iPhone 6 Plus and also using Xcode 8 beta 2.

Thanks!

Actually the just released beta version correctly opens the music browser after funnily asking the authorization to access Apple Music.

I'm not seeing any "Apple Music authorization" requested. I try to request acess to the MediaLibrary, but the app crashes when I do so...

Turns out I was missing setting the value for the "NSAppleMusicUsageDescription" in my app's info.plist. After setting that I saw the prompt that fbartolom mentioned.


Thanks fbartolom!!