Documentation: Misleading information about sharing settings in WatchKit apps
| Originator: | craig.hockenberry | ||
| Number: | rdar://23117468 | Date Originated: | 14-Oct-2015 03:53 PM |
| Status: | Open | Resolved: | |
| Product: | watchOS SDK | Product Version: | 2.0 |
| Classification: | Other Bug | Reproducible: | Always |
The Apple Watch Programming Guide shows information for storing settings that is no longer valid in watchOS 2.x https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/Settings.html#//apple_ref/doc/uid/TP40014969-CH22-SW1 In particular, this doesn’t work anymore: NSUserDefaults *defaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.example.MyWatchKitApp"]; BOOL enabled = [defaults boolForKey:@"enabled_preference"]; The only reference to this change is in the transition guide: https://developer.apple.com/library/watchos/documentation/General/Conceptual/AppleWatch2TransitionGuide/UpdatetheAppCode.html#//apple_ref/doc/uid/TP40015234-CH6-SW4 Many developer sites have outdated information. For example: http://stackoverflow.com/questions/27007288/watchkit-sdk-not-retrieving-data-from-nsuserdefaults/27007346#27007346 http://blog.curtisherbert.com/data-synchronization-with-watchkit/ I don’t expect you to fix external sites, but the “Apple Watch Programming Guide” should be a definitive source of information. There is not even a hint that these capabilities have changed in the most recent release. I spent hours thinking I had a provisioning problem before I realized that the two devices had different persistent domains (and that they weren’t being synced.)
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!