I have added application groups to my application identifier on the developer portal and use this application identifier in my provisioning profile. My product ID in Xcode is set to this application ID.
In my application, I call this from didFinishLaunchingWithOptions
NSUserDefaults.standardUserDefaults().setObject("hey", forKey: "TEST")
NSUserDefaults.standardUserDefaults().synchronize()
In my keyboard app extension, I call this:
if let test = NSUserDefaults.standardUserDefaults().objectForKey("TEST") as? String
{
println(test)
}
This is not true. If I delete the verification check and just print the result, the user keyboard will fail.
EDIT Also tried this with the same result:
App delegation
var userDefaults = NSUserDefaults(suiteName: "group.jackedgames.myappgroup")
userDefaults.setObject("TEST", forKey: "TEST")
userDefaults.synchronize()
Keyboard extension
var userDefaults = NSUserDefaults(suiteName: "group.jackedgames.myappgroup")
var test = userDefaults.objectForKey("TEST") as String
NSLog(test)
In the Features section of both goals, I have groups included with the selected group identifier.
What am I missing here?