Can I use NSUbiquitousKeyValueStore to sync between Mac and iOS?

963 views Asked by At

I am porting my iOS app over to Mac OS (Mountain Lion) for sale in the Mac App Store in the near future.

The iOS app uses iCloud syncing with NSUbiquitousKeyValueStore which was very simple to implement and works very well. I was wondering if it would be possible to access the data stored by the iOS app in Mac OS. The user defaults between the apps are identical so this should work very well as long as it is possible to do it. Can a Mac app access iCloud NSUbiquitousKeyValueStore data stored by an iOS app?

1

There are 1 answers

2
Julien On BEST ANSWER

If you are using the same store identifier (defined by com.apple.developer.ubiquity-kvstore-identifier entitlement), yes.

In fact, you can share the same store identifier between different apps on iOS devices and Mac OS X. The only restriction is that you need to have the same TEAM id for all apps since the com.apple.developer.ubiquity-kvstore-identifier entitlement always starts with this id.