I am making two iPad app that communicate with one file and fetches all the data from one file. I search and find this "containerURLForSecurityApplicationGroupIdentifier" we can create group and store in that. I have write the code below. In entitlement file i write
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>$(TeamIdentifierPrefix)com.xxx.catalogapp.Coredata</string>
</array>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)com.xxx.catalogapp.Coredata</string>
</array>
</dict>
</plist>
And in Code i write this
NSFileManager* fileManager = [NSFileManager defaultManager];
NSURL* storeUrl = [fileManager
containerURLForSecurityApplicationGroupIdentifier:@"com.xxx.catalogapp.Coredata"];
NSLog(@"%@", storeUrl);
But storeUrl I am getting nil
value.