objective c - how to create a directory in /Library/Application Support -


i'm getting permission denied error when try create directory "my app name" in /library/application support/

//@"/library/application support/my app name/" nsstring *path = [[nssearchpathfordirectoriesindomains(nsapplicationsupportdirectory, nslocaldomainmask, yes) objectatindex:0] stringbyappendingpathcomponent:@"my app name"]; if(![[nsfilemanager defaultmanager] createdirectoryatpath:path withintermediatedirectories:yes attributes:null error:&error]){     nslog(@"%@", error); } 

i don't need sandbox app read sandboxing , adding special entitlements fix it.

i tried adding exception entitlements file no luck

<key>com.apple.security.temporary-exception.files.absolute-path.read-write</key> <array>     <string>/library</string>     <string>/library/application support/</string> </array> 

any ideas?

edit: should note looking save file shared users. dont want each user have different version of file.

the sandbox won't override filesystem permissions - narrows not widens access! /library not user-writeable. should use ~/library/application support (located via api not hardcoded path).


Comments

Popular posts from this blog

pentaho - Carte Status / Kettle Slave Server Status page shows status for random runs instead of the latest run -

R summary function in ddply (plyr) in a simple way -

c# - Are delegates created via lambda expressions guaranteed to be cached? -