gpt4 book ai didi

ios - iCloud 权利被拒绝

转载 作者:塔克拉玛干 更新时间:2023-11-02 10:15:57 24 4
gpt4 key购买 nike

我已经在我的(现有)应用程序上工作了一段时间,以添加对 iCloud 同步的支持。我总共有 3 个版本的应用程序:

a) 普通 iPhone 版本
b) 精简版(免费)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 同步其核心数据存储数据库?

最佳答案

根据 iCloud Design Guide: iCloud Fundamentals ,您所有共享 iCloud 容器的应用程序都可以使用单个 iCloud 容器来实现(如果您愿意的话)。这里要注意的是,主要(第一个)容器 ID 必须是您当前正在开发的应用程序Bundle ID,或者Bundle ID 您之前提交的任何应用(共享相同的Team ID)。

我举个例子,

让我们假设您的应用常规 iPhone 应用 (a) 有一个 Bundle ID com.yourteam.iphoneapp 并且它是您首先提交的并且可用在 App Store 上。然后,您还必须为所有其他版本提供与主 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.

  1. 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com