Le 28 mai 2012 à 07:18, Graham Cox a écrit : > > On 28/05/2012, at 3:10 PM, Marco S Hyman wrote: > >> I think that is your issue. > > > What is the issue? > > I have read that, several times. It states: > > "With these provisos in mind, you can use a path-based temporary exception > entitlement to gain programmatic access to the user’s ~/Library/Preferences > folder. Use a read-only entitlement to avoid opening the user’s preferences > to malicious exploitation." > > Well, that's what I am doing as I pointed out in my last message. But I still > am unable to read the particular pref I need. (I have filed a radar asking > that this feature be made available officially as well, but it's certainly a > dupe). > > > --Graham >
That's because you're not trying yo read ~/Library/Preferences/com.apple.iApps.plist but you are trying to read a preference file in your sandboxed application container. You just can't access file in ~/Library/Preferences using the CFPreferences API, as all calls to CFPreferences will be automagically redirected to you application container preferences folder instead. The posted documentation says: «A POSIX function, such as getpwuid, can provide the file system path you need.» I guess it means you have to resolve the real com.apple.iApps.plist path yourself and access the file directly. -- Jean-Daniel _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com