WatchKit Settings Bundles Don’t Sync Across Devices

Originator:SlaunchaMan
Number:rdar://28550530 Date Originated:29-Sep-2016 04:52 PM
Status:Open Resolved:
Product:watchOS SDK Product Version:Xcode Version 8.0 (8A218a)
Classification:Serious Bug Reproducible:Always
 
Summary:
I’m trying to use a Settings bundle in my iOS app to set some user preference values for my watchOS app, as described in this document:

https://developer.apple.com/library/content/documentation/General/Conceptual/WatchKitProgrammingGuide/Settings.html

However, none of the modifications I make to the values in the iOS Watch app’s Settings area for this app are synced to the watchOS device—changes do not trigger KVO notifications, nor are they present at the next app launch.

Steps to Reproduce:
1. Follow the steps in the linked document to get an iOS app with a watchOS app embedded inside of it, both using the same App Group ID, with a “Settings-Watch.bundle” settings bundle in the iOS app with the same App Group ID in a top-level String.
2. Change the preference values using the Watch app on the iPhone.

Expected Results:
The changes are synced to the watchOS device.

Actual Results:
The changes are not synced to the watchOS device.

Version:
Build machine:
Xcode Version 8.0 (8A218a)
macOS Sierra Version 10.12 (16A323)

Notes:
Syncing of these values should work in the following directions:
iPhone Watch App -> watchOS Device
iPhone Watch App -> iOS App
iOS App -> iPhone Watch App
iOS App -> watchOS Device
watchOS Device -> iOS App (via WatchConnectivity, as the UserDefaults database is read-only on the watch)
watchOS Device -> iOS App (via WatchConnectivity) -> iPhone Watch App

I have attached a sample project that you can use to validate this behavior. Note that the iOS and watchOS simulators do not exhibit the same behavior as real devices.

Configuration:
iPhone 7 Plus (128GB, AT&T), iOS 10.0.2 (14A456)
Apple Watch 42mm, watchOS 3.0 (14S326)\

Comments

Sample Project

Sample project here: https://github.com/SlaunchaMan/RadarSampleProjects/tree/master/28550530/WatchPreferences

By SlaunchaMan at Sept. 29, 2016, 8:56 p.m. (reply...)

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!