3

I just noticed that after having updated Xcode to version 10.2.1, I'm unable to see the permission request for Library and Apple Music when launching a couple of projects of mine on the simulator.

Debugging, I realised that the authorization request call goes unanswered

MPMediaLibrary.requestAuthorization { status in
    // switch on status and handle it - never gets there
}

I didn't change anything in the code or configuration of my projects, and I'm very sure that this wasn't happening with previous versions of Xcode. Just for the record, everything works fine on a real device.

Does anybody have any idea? Am I the only one who's experiencing this?

Eil88
  • 121
  • 5
  • 1
    Seems like `MPMediaLibrary.requestAuthorization` is not supported on iOS simulators. You should run your app on a device instead. – Jonny May 19 '19 at 03:01

1 Answers1

2

Looks like it doesn't work on the simulator. It now just hangs, and the closure is never executed.

It did, at one time, but I guess that it no longer does.

Sort of unsurprising, as the basic media capabilities aren't really supported on the simulator anyway.

I have tested my code on device, and verified that it works, but it is annoying (not a showstopper) that it doesn't work on the simulator.

Chris Marshall
  • 4,910
  • 8
  • 47
  • 72