NSUserDefaults standardUserDefaults not working with extension
问题 I added App Groups to my app ID in the developer portal and am using that App ID in my provisioning profile. My Product Identifier in Xcode is set to that app ID. In my app delegate 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) }