Another benefit to App Groups is the ability to share a NSUserDefaults database. This also works for App Extensions (notification center widgets, custom keyboards, etc). html
Initialize your NSUserDefaults object like this in all applications in the app group and they will share the database: ios
Objective-C: app
[[NSUserDefaults alloc] initWithSuiteName:@"<group identifier>"];
Swift: ide
NSUserDefaults(suiteName: "<group identifier>");
Keep in mind everything from the [NSUserDefaults standardUserDefaults] database for each application will not carry over into this database. ui
The documentation gives a correct example as well (As of Beta 3). this
And don't forget to synchronize the database: spa
[yourDefaults synchronize];