I am unable to save any changes to the NSUbiquitousKeyValueStore on macOS Sierra. I wrote a dead-simple app just for testing. On pressing a button, the app does the following:
[[NSUbiquitousKeyValueStore defaultStore] setString:@"Mac" forKey:@"TestString"];
BOOL sync = [[NSUbiquitousKeyValueStore defaultStore] synchronize];
NSLog(@"Did sync change from memory to disk: %i", sync);
[[NSUserDefaults standardUserDefaults] setObject:@"Mac" forKey:@"TestString"];
The return BOOL sync value there is NO on macOS 10.12 Sierra, and the change is never noticed by an iOS 9 device which is monitoring for key-value changes for the same App ID.
The entitlements are all set up properly, and I have verified that the code works properly when the test app is run under OS X 10.11, and the change is noticed in my test app running iOS 9.
Is this a bug? Is anyone else experiencing this?
Or is this expected behavior—i.e. a beta OS is not allowed to write to NSUbiquitousKeyValueStore?