阅读背景:

该应用程序缺少必需的权利com.apple.developer.icloud-services'

来源:互联网 

I'm using a public iCloud database in my app, which works great and is up on the store.

我在我的应用程序中使用了一个公共的iCloud数据库,该数据库工作得非常好并且在商店中。

On updating my app to a new version (with Xcode 7 on iOS9) I get a crash on the line :

在将我的应用程序更新为新版本(在iOS9上使用Xcode 7)时,我遇到了崩溃:

CKContainer * container = [CKContainer containerWithIdentifier:@"iCloud.com.identifier"];

*** Terminating app due to uncaught exception 'CKException', reason: 'The application is missing required entitlement com.apple.developer.icloud-services'

This happens ONLY the first launch of the app after updating, and only on iOS9. After that first (update) launch, the app launches and iCloud works as expected.

这仅在更新后首次启动应用程序时发生,并且仅在iOS9上发生。在第一次(更新)启动之后,应用程序启动并且iCloud按预期工作。

I can recreate the crash consistently by downloading the current store version of the app, then running the updated app from Xcode 7.

我可以通过下载应用程序的当前商店版本,然后从Xcode 7运行更新的应用程序来一致地重新创建崩溃。

If I do the same steps (download production app, and update) using iOS8, I do not have the same crash.

如果我使用iOS8执行相同的步骤(下载生产应用程序和更新),我没有相同的崩溃。

I'm guessing this is an iOS9 or Xcode 7 bug. Any ideas?

我猜这是一个iOS9或Xcode 7的错误。有任何想法吗?

EDIT : This actually happens on the first launch of the app on iOS9, regardless of whether I'm updating or just first installing.

编辑:这实际上发生在iOS9上首次启动应用程序,无论我是更新还是只是首次安装。

5 个解决方案

#1


8  

Toggling iCloud didn't work for me. Reinstalling the app didn't work either. The problem seems to happen whenever I have break points enabled. If I turn these off it runs without any problem.

切换iCloud并不适合我。重新安装应用程序也无效。每当我启用断点时,问题似乎就会发生。如果我关闭它,它运行没有任何问题。

#2


7  

Toggling the iCloud Capability on and off seems to have fixed it.

打开和关闭iCloud功能似乎已经修复了它。

#3


1  

For me toggling the iCloud capability off/on was the way to fix it, due to after that in the entitlements file a new key is created: "APS Environment" and its value "production" or "deployment".

对于我来说,关闭/打开iCloud功能是修复它的方法,因为在权利文件中创建了一个新密钥:“APS环境”及其值“生产”或“部署”。

#4


0  

Changed the name of my app, therefore the entitlements file should have been different. Turning off and back on recreated the required file. Turning off breakpoints made it filter through (strange).

更改了我的应用程序的名称,因此权利文件应该是不同的。关闭然后重新创建所需的文件。关闭断点使其过滤(奇怪)。

#5


0  

For me, I had Code Signing Entitlements designated for my Test target. So the app would build fine. But the unit tests would just quit no matter what. Clearing out the Code Signing Entitlements field from the Build Settings of the test target fixed the issue. After. Many. Hours.

对我来说,我为我的测试目标指定了代码签名权利。所以该应用程序将建立良好。但无论如何,单元测试都会退出。清除测试目标的Build Settings中的Code Signing Entitlements字段可修复该问题。后。许多。小时。


分享到: