0 Replies
      Latest reply on Jan 2, 2020 10:20 AM by IsaiahvH
      IsaiahvH Level 1 Level 1 (0 points)

        I would like to use the MediaPlayer in Swift 5 to have a user select a song for use in my app.

        This should be possible using MPMediaPicker using this official Apple documentation.

        However, it seems this documentation is incomplete.

        If the user does not have the Apple Music app installed, then upon presentation of MPMediaPickerController, they are presented with the error alert "Internal Error", "The requested app extension could not be found" (image). This is undesirable, uninformative to the user and seemingly unpreventable.

        This is also irregardless of having correctly set the NSAppleMusicUsageDescription key in Info.plist and having the appropriate (authorized) MPMediaLibraryAuthorizationStatus.


        The necessity of having the Apple Music app installed is mentioned nowhere in Apple's documentation, which is lacking.
        Secondly, there appears to be no way (that I could find on the Internet) to then manually check beforehand if the Apple Music app is installed.


        How can my app determine if the Apple Music app is installed, in order to prevent presenting a MPMediaPickerController if there is no music app installed and so prevent the uninformative and undetectable error displayed otherwise?

        Kind regards,