objective c - Fails to read/write a plist file in the Preferences folder of a group container -


my sandboxed application , helper using nsuserdefaults manage preferences. preferences file located in group container shared 2 applications. i’ve decided use plist file instead.

groupcontainerurl = [fm containerurlforsecurityapplicationgroupidentifier:sc_appgroupname]; prefsurl = [groupcontainerurl urlbyappendingpathcomponent:sc_prefsrelativepath];  if(! [fm fileexistsatpath:prefsurl.path])     [self createdictionary]; else {   prefsfile = [nsmutabledictionary dictionarywithcontentsofurl:prefsurl];     if(prefsfile == nil)         [self filemanageralert];    // nsalert } 

when want read or write file in group container, access denied. prefsfile set nil when create url. following messages appear in console :

25/07/2016 17:18:02,650 sandboxd[126]: ([1445]) myapp(1445) deny file-read-data /users/lionel/library/group containers/x2rd457a99.com.mycompany.myapp/library/preferences/x2rd457a99.com.mycompany/myapp.plist 25/07/2016 17:02:02,235 sandboxd[126]: ([1413]) myapp(1413) deny file-write-create /users/lionel/library/group containers/x2rd457a99.com.mycompany.myapp/library/preferences/x2rd457a99.com.mycompany.myapp.plist 

however, can access exemple caches folder of group container without problem. dont think i’ve missed entitlement key. use of preferences folder reserved nsuserdefaults ?


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -