Requesting Assistance with MusicKit Authorization and Account Monitor Registration Issue

2 Days and I am frustrated. I"ve crossed my T's and dotted my I's.

Using

  • musickit

Error

  • Attempted to register account monitor for types client is not authorized to access: {( "com.apple.account.iTunesStore"

)}

Offending Code

  • var request = MusicLibraryRequest<MusicKit.Playlist>()

  • request.sort(by: .lastPlayedDate, ascending: false)

  • let response = try await request.response()

Verified

  • Custom IOS Target Properities
    • Privacy - Media Library Usage Description
  • Correct Bundle Identifier
  • Checkbox AppServcies/Music Kit for App ID

Please help!

  • 2 days of racking my brain, just can't get passed error

  • MusicKit does ask me to authorize

  • Other code works

    • let request = MusicRecentlyPlayedContainerRequest()
    • let response = try await request.response()

See Image

Some open questions:

  • I assume MusicKit is doing 2 factor
  • I'm not getting an error so I'm guessing identity is making it over?

Hey @terkaly Did you ever get this resolved? I am getting a similar error and have no idea how to fix it.

Has anyone found a solution to this? I also see this error (not authorized to access com.apple.accountiTunesStore) when attempting to monitor changes to SystemMusicPlayer.shared.state as well as when I attempt to fetch the user's playlists from their library using MusicLibraryRequest<Playlist>().

I have also checked if I missed any settings/configurations with my app's bundle certifications, but I confirmed that MusicKit is checked off under App Services and I have added the necessary Privacy - Media Library Usage to Info.plist

Requesting Assistance with MusicKit Authorization and Account Monitor Registration Issue
 
 
Q