Tuesday, November 19, 2024


Tags

NSMediaLibrary and Music library warning.

If your app starts displaying a warning about accessing music when it doesn't check to see if you're using NSMediaLibrary

Tuesday, November 19, 2024 - Sam Rowlands

I recently had an App Wrapper customer experience a warning about accessing the user "Music" collection when his app did nothing with Apple Music, or the Music folder.

Music warning dialog

We went over the App Wrapper settings, just incase access to the Music folder was requested. It wasn't.

However the customer found the cause of the warning, they were using NSMediaLibrary to allow photo selection. Updating their code to use PHPickerViewController solved the warning. It's worth noting that PHPickerViewController is only available on macOS 13 Ventura and newer.