Re: music.read-only sandbox entitlement doesn't seem to work

2012-01-17 Thread Michael Crawford
I've figured out what is going on (I think).  As long as your iTunes library is 
installed in this path: ~/Music/iTunes/iTunes Media/, the music entitlement 
works.  It is path specific!  This makes com.apple.security.assets.music.* 
only sligtly better than 
com.apple.security.temporary-exception.files.home-relative-path.* in that the 
music entitlement is not temporary.  However The user can break it by going 
into iTunes preferences and moving their media files.  I haven't tested it but 
I assume this will brake the movies entitlement as well.

- Michael

On Jan 15, 2012, at 2:55 PM, Michael Crawford wrote:

 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%20Music/Depeche%20Mode/Violator/01%20World%20In%20My%20Eyes.mp3
  (File not found)
 
 Do I need to specify some sort of relative substitute when using 
 *.music.read-only?
 
 -Michael
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 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:
 http://lists.apple.com/mailman/options/cocoa-dev/michaelacrawford%40me.com
 
 This email sent to michaelacrawf...@me.com
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 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:
 http://lists.apple.com/mailman/options/cocoa-dev/michaelacrawford%40me.com
 
 This email sent to michaelacrawf...@me.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: music.read-only sandbox entitlement doesn't seem to work

2012-01-17 Thread Laurent Daudelin
On Jan 17, 2012, at 15:05, Michael Crawford wrote:

 I've figured out what is going on (I think).  As long as your iTunes library 
 is installed in this path: ~/Music/iTunes/iTunes Media/, the music 
 entitlement works.  It is path specific!  This makes 
 com.apple.security.assets.music.* only sligtly better than 
 com.apple.security.temporary-exception.files.home-relative-path.* in that 
 the music entitlement is not temporary.  However The user can break it by 
 going into iTunes preferences and moving their media files.  I haven't tested 
 it but I assume this will brake the movies entitlement as well.

Just awesome… That's just what we needed.

-Laurent.
-- 
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin 
http://www.nemesys-soft.com/
Logiciels Nemesys Software  
laur...@nemesys-soft.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: music.read-only sandbox entitlement doesn't seem to work

2012-01-15 Thread Michael Crawford
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%20Music/Depeche%20Mode/Violator/01%20World%20In%20My%20Eyes.mp3
  (File not found)
 
 Do I need to specify some sort of relative substitute when using 
 *.music.read-only?
 
 -Michael
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 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:
 http://lists.apple.com/mailman/options/cocoa-dev/michaelacrawford%40me.com
 
 This email sent to michaelacrawf...@me.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


music.read-only sandbox entitlement doesn't seem to work

2012-01-09 Thread Michael Crawford
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%20Music/Depeche%20Mode/Violator/01%20World%20In%20My%20Eyes.mp3
 (File not found)

Do I need to specify some sort of relative substitute when using 
*.music.read-only?

-Michael
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: music.read-only sandbox entitlement doesn't seem to work

2012-01-09 Thread Michael Nickerson

On Jan 09, 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/
 


I don't have a solution for you, but I wanted to point out that even using 
temporary exceptions won't work for everyone - you can change iTune's music 
library to some other path within iTunes.

 
--
Darkshadow
(aka Michael Nickerson)
http://www.nightproductions.net


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com