我已经在我的(现有)应用上工作了一段时间,以添加对 iCloud 同步的支持。我总共有 3 个版本的应用程序:
a) 普通 iPhone 版本
b) lite(免费)iPhone 版
c) iPad版
我想使用 iCloud 使所有 3 个版本/设备之间的核心数据存储同步。我已经完成了实现,并且我在设备上放置的开发版本运行良好。
昨天我决定提交iPhone版本,但被拒绝了:
Invalid Code Signing Entitlements - The signature for your app bundle contains entitlement values that are not supported. For the com.apple.developer.ubiquity-container-identifiers entitlement, the first value in the array must consist of the prefix provided by Apple in the provisioning profile followed by a bundle identifier suffix. The bundle identifier must match the bundle identifier for one of your apps or another app that you are permitted to use as the iCloud container identifier.
Specifically, value "[teamid].com.[myself].[somename]" for key "com.apple.developer.ubiquity-container-identifiers" in [my app] is not supported.
我真的不知道这些标识符应该是什么样子。在此页面上:https://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/iCloud/iCloud.html#//apple_ref/doc/uid/TP40007072-CH5-SW1他们说我的其他应用程序的容器......我是否必须为我的应用程序的 3 个版本添加 3 个容器?到目前为止,我在 project/targets/summary/entitlements 下配置:
[x] iCloud 键值存储:com.[myself].[somename]
iCloud 容器:com.[myself].[somename]
对于所有 3 个版本(相同的标识符)。我需要具体配置什么,以便所有 3 个版本都可以通过 iCloud 同步它们的核心数据存储数据库?
Best Answer-推荐答案 strong>
根据iCloud Design Guide: iCloud Fundamentals ,您所有共享 iCloud 容器的应用程序都可以使用单个 iCloud 容器来实现(如果您愿意的话)。这里要注意的是,主(第一个)容器 ID 必须是您的当前正在开发的应用程序的 Bundle ID,或 Bundle ID 您之前提交的任何应用(共享相同的团队 ID)。
我举个例子,
让我们假设您的应用常规 iPhone 应用 (a) 有一个 Bundle ID com.yourteam.iphoneapp 并且它是您首先提交并且可用的那个在应用商店。然后,您还必须为所有其他版本提供与主要 iCloud 容器 ID 相同的 ID。
这是上述文档中的相关部分:
In the Xcode target editor’s Summary tab, you can request access to as
many ubiquity containers as you need for your app. For example, say
you provide a free and paid version of your app. You’d want users, who
upgrade, to retain access to their iCloud documents. Or, perhaps you
provide two apps that interoperate and need access to each other’s
files. In both of these examples, you obtain the needed access by
specifying a common ubiquity container and then requesting access to
it from each app.
- Pick one of your iCloud-enabled apps to serve as the primary app for the common ubiquity container. The app you pick can be the current
one you are developing, or another app of yours submitted for
distribution in the App Store and whose entitlements use the same team
ID.
关于ios - iCloud 权利被拒绝,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/10234289/
|