[iOS 14 Bug?] MPMediaPlaylist.addItem(withProductID:) -> Freeze ūü•∂

Hello Apple World,

I am working on an app that adds Apple Music songs to an MPMediaPlaylist.

I was able to do this successfully in iOS 13.7.

However, today I started testing on iOS 14.0.1 and the same code causes my app to freeze completely.

Code Block
print("PlaylistManager.addItem playlist \(playlist) identifier \(identifier) MPMediaLibrary.authorizationStatus() \(MPMediaLibrary.authorizationStatus().rawValue)")
playlist.addItem(withProductID: identifier) { (error) in
if error != nil {
         print("An error occurred while adding an item to the playlist: \(error!.localizedDescription)")
}
}

Output:
Code Block
"PlaylistManager.addItem playlist <MPConcreteMediaPlaylist: 0x2819dc4d0> identifier 1531532609 MPMediaLibrary.authorizationStatus() 3"

Because I don't get any errors printed (the app just freezes up) and I don't see any crash logs in Devices and Simulators, I am not sure how to proceed.

Is anyone else running into this issue with MPMediaPlaylist.addItem in iOS 14?

Is there a general way to debug app freezes?

Any help will be very much appreciated;

Thank you in advance!

Marvin

Post not yet marked as solved Up vote post of car_service Down vote post of car_service
599 views

Answers

I have exactly the same issue. Also reported here:

https://developer.apple.com/forums/thread/658557
Hello @car_service, 

Thank you very much for reporting this issue.

As @wallsie68 stated in his response, this is indeed the same issue as the one reported in this other post.

We will investigate this regression.

Thanks again for your feedback.

Best regards, 

Looks like it's finally fixed in iOS 15 beta.

Hello @okla,

Great news! Thanks for reporting that!

Best regards,