When I call NSUbiquitousKeyValueStore's synchronize method after running my app directly from Xcode on macOS Sierra, it returns false and following error is printed in Console.app:
Refusing TCCAccessRequest for service kTCCServiceUbiquity from client com.apple.dt.Xcode in background session
As far as I can tell, changed keys are not saved to iCloud. They are remembered in memory locally but lost after app re-launch.
I believe all my entitlements are set correctly (iCloud KVS enabled in Capabalities of the project, all checked). Do I need to archive & export my app in order to debug / test iCloud?
Any ideas how to fix / workaround this?