阅读背景:

仅在升级应用程序时出现NSUbiquitousKeyValueStore错误。干净安装的应用程序工作正常。 iCloud的

来源:互联网 

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:

我在应用程序商店中有一个现有的应用程序,我正在添加iCloud。我跟着Apple的指南以及其他人一直都很好。但是我注意到,如果我的设备上安装了2.0版本的应用程序(最后一个生产版本),然后我将版本3.0(带有iCloud的版本)从Xcode部署到设备,当我运行应用程序时,我得到:

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.

但是,如果我从设备中删除原始应用程序然后从Xcode部署3.0我没有收到错误,iCloud工作正常。

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.

我在运行iOS 5.0.1的多个设备上试过这个,但它们都做了同样的事情。

1 个解决方案

#1


6  

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

这不是权利过程的问题。看看以下技术说明:Technote 2285

Quote:

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

不要使用Xcode安装或运行应用程序的更新以进行质量保证测试。

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.

为了使开发周期更快,Xcode只将更改的文件推送到它运行的应用程序,并且不会从现有的app-bundle中删除文件。这使构建速度明显加快。但这意味着在旧版本的基础上运行Xcode可能会产生错误地过时的应用程序从App Store下载时应用程序不具备的文件。这可能会在测试期间导致问题并掩盖错误。


分享到: