MusicSubscriptionOffer can't be presented without Apple Music App

Hey All,

Loving the MusicKit API but have one question regarding the .musicSubscriptionOffer(isPresented:options:onLoadCompletion:). When Apple Music is not installed on the device it can't be presented, is there any way to still present the musicSubscriptionOffer or do I have to prompt the user to install Apple Music first?

and if so, what's the best way to check if Apple Music is installed?

Accepted Answer

I also noticed if you have the button that will present the musicSubscriptionOffer use .toggle() instead of = true and you tap that button twice it will make your app crash 😅

Hello @hiddevdploeg,

Thank you very much for your question about musicSubscriptionOffer(isPresented:options:onLoadCompletion:).

It's actually expected that this API would only work with the Apple Music app installed. That said, I think there are probably things we can do on our end to make the user experience better for apps that use this API. In other words, it's not your responsibility as a third-party app developer to worry about this edge case (nor could you handle it because there's no supported public API for you to figure out that the Apple Music app is not installed).

Could you file a ticket on Feedback Assistant explaining the current behavior when using this API without the Apple Music app installed? Including a screenshot or a screen recording would be even better.

As for the crash when you use toggle(), I would encourage you to file another ticket on Feedback Assistant including some sample code showing how you're using musicSubscriptionOffer(isPresented:options:onLoadCompletion:). Including a sysdiagnose with this ticket would also be helpful.

Thank you very much in advance for your help.

Best regards,

Hello @hiddevdploeg,

I have recently received the ticket you filed on Feedback Assistant: FB9826082. Thank you so much for taking the time to file it; this was very helpful.

We are currently investigating ways to address both of the issues you raised in this thread.

Best regards,

Hello @hiddevdploeg,

We have included a fix for this issue in iOS 15.4 Beta 1.

I hope this helps.

Best regards,

MusicSubscriptionOffer can't be presented without Apple Music App
 
 
Q