Question

I have an existing app in the app store, and I'm adding iCloud. I've followed Apple's guides as well as others and its all working fine. However I've noticed that if I have version 2.0 of my app (the last production version) installed on a device and then I deploy version 3.0 (the one with iCloud) from Xcode to the device, when I run the app I get:

NSUbiquitousKeyValueStore error: com.yourcompany.YourApp has no valid com.apple.developer.ubiquity-kvstore-identifier entitlement

However if I delete the original app from the device then deploy 3.0 from Xcode I don't get the error, and iCloud works fine.

What should I do so that users don't have to delete the app prior to upgrading?

I've tried this on multiple devices running iOS 5.0.1 and they all do the identical thing.

Was it helpful?

Solution

This is not an issue with the entitlements procedure. Have a look at the following tech note: Technote 2285

Quote:

Do not use Xcode to install or run updates to your app for quality assurance testing.

To make the development cycle faster, Xcode only pushes changed files into the apps it runs, and does not delete files from existing app-bundles. This makes builds significantly faster. But it means that running with Xcode on top of an old build can produce a build that erroneously has outdated files that the app will not have when downloaded from the App Store. This can cause problems during testing and mask bugs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top