Accessing external music files in sandboxed mac program

I created a little mac software accessing the music playlists via iTunesLibrary and then playing songs from the playlist using "AVAudioPlayer(contentsOf: fileURL)" from AVFoundation.


If the the app is not sandboxed, no problem.

If the the app is sandboxed and the music files are in the "music" folder, still everything works fine (if "com.apple.security.assets.music.read-only" is set to true).


But due to high prices of internal SSDs, many people have aliased the "itunes" folder linking to an external drive. If you want to play such a music file located on an external drive, you get an OSStatus error -54. I see no way to get this setup working when the program is sandboxed.

Any solutions?


Best regards,


Nina