Re: music.read-only sandbox entitlement doesn't seem to work
Re: music.read-only sandbox entitlement doesn't seem to work
- Subject: Re: music.read-only sandbox entitlement doesn't seem to work
- From: Michael Crawford <email@hidden>
- Date: Sun, 15 Jan 2012 14:55:50 -0500
I tried replacing my Core Audio code for reading and decoding the music files with calls to the AV Foundation framework. I was hoping that the defunct assets.music.read-only entitlement would begin working if I used AV Foundation instead. No joy. AVAsset cannot read the file (NO == asset.readable) without the temporary path entitlement in place.
-Michael
On Jan 9, 2012, at 12:52 PM, Michael Crawford wrote:
> I'm converting over a legacy Core-Audio application to run sandboxed. This app normally access files in the iTunes library in order to analyze them for BPM information. Enabling the music.read-only entitlement does not work.
>
> com.apple.security.assets.music.read-only
>
> I get the following error:
>
> deny file-read-data /Users/smj/Music/iTunes/iTunes Music/Depeche Mode/Violator/01 World In My Eyes.mp3
>
> I have been able to overcome this problem by adding the temporary exception to perform relative reads from the users home directory using this path:
>
> /Music/iTunes/iTunes Music/
>
> My issue with this solution is that it is temporary! Can anyone shed light on why the music entitlement is not working? As I indicated I'm using Core Audio APIs. Do I need to switch to AVAsset or something like this to make this work? Some other little detail I'm leaving out?
>
> One other thought that just occurred to me is that I'm using the paths I get from iTunes to try and access these files. These paths are absolute from the root directory and look something like this:
>
> Unable to open track file://localhost/Users/michael/Music/iTunes/iTunes Music/Depeche Mode/Violator/01 World In My Eyes.mp3 (File not found)
>
> Do I need to specify some sort of relative substitute when using *.music.read-only?
>
> -Michael
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden