since days I try to get some data vom the parent to my WatchKitApp. I added a group to the parent, to WatchApp and WatchApp Extension. Then I use this code to save the data in Objective-C:
NSUserDefaults *defaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.mygroup"];
[defaults setInteger:5 forKey:@"test"];
[defaults synchronize];
Then I try to get the data from the WatchKit in Swift:
let defaults = NSUserDefaults(suiteName: "group.mygroup")
let integer = defaults!.integerForKey("test")
print("Test \(integer)")
In my opinion the code and setting are right. I don't know what I'am doing wrong.