阅读背景:

cloudkit数据不会出现在submited app iOS 8.1中

来源:互联网 

Here's the deal. My app is using Defualt Public CloudKit container to provide some images. The app works well on my iPhone and different simulators on iOS 8.0. I submited my app and it's on app store now but the Cloudkit functionality does not work on the app downloaded from app store.

这是交易。我的应用程序使用Defualt公共CloudKit容器来提供一些图像。这款应用在我的iPhone和iOS 8.0上的不同模拟器上运行良好。我提交了我的应用,它现在在应用商店,但Cloudkit功能不能在从应用商店下载的应用上工作。

Is there anything I should have done within the code or setting? Here is my Xcode setting.

在代码或设置中有什么我应该做的吗?这是我的Xcode设置。

1 个解决方案

#1


4  

OK I found where I was wrong. I put it here for other people. We need to deploy the Development Environment to Production Environment in CloudKit dashboard.

好的,我找到我错的地方了。我把它放在这里给其他人看。我们需要在CloudKit仪表板中将开发环境部署到生产环境。

The Development and Production Environments

开发和生产环境

CloudKit provides separate development and production environments for your record types and data. The development environment is a more flexible environment that is available only to members of your development team. When your app adds a new field to a record and saves that record in the development environment, the server updates the schema information automatically. You can use this feature to make changes to your schema during development, which saves time. One caveat is that after you add a field to a record, the data type associated with that field cannot be changed programmatically. To change a field’s type, you must delete the field in CloudKit Dashboard and add it again with the new type.

CloudKit为您的记录类型和数据提供单独的开发和生产环境。开发环境是一个更加灵活的环境,只有您的开发团队成员才能使用。当应用程序向记录添加新字段并将该记录保存到开发环境中时,服务器将自动更新模式信息。您可以在开发过程中使用此特性对模式进行更改,从而节省时间。需要注意的是,在向记录添加字段之后,不能以编程方式更改与该字段关联的数据类型。要更改字段类型,必须删除CloudKit仪表板中的字段,并将其添加到新类型中。

Prior to deploying your app, you migrate your schema and data to the production environment using CloudKit Dashboard. When running against the production environment, the server prevents your app from changing the schema programmatically. You can still make changes with CloudKit Dashboard but attempts to add fields to a record in the production environment result in errors.

在部署应用程序之前,您需要使用CloudKit仪表板将模式和数据迁移到生产环境。当针对生产环境运行时,服务器防止您的应用程序以编程方式更改模式。您仍然可以对CloudKit仪表板进行更改,但是尝试向生产环境中的记录添加字段会导致错误。

Note: iOS Simulator works only with the development environment. When you are ready to test your app in a production environment, do so from a device. During development, Xcode automatically points your app to the development environment. Before you ship your app, configure your app using the distribution workflow. In this workflow, Xcode lets you choose whether you want to target the development or production environment and adds the com.apple.developer.icloud-container-environment entitlement to your app with the value you selected. Prior to shipping, be sure to configure your app for the production environment. Apps that target the development environment will be rejected by the App Store.

注意:iOS模拟器只适用于开发环境。当您准备在生产环境中测试应用程序时,请使用设备进行测试。在开发期间,Xcode会自动将应用程序指向开发环境。在发布应用程序之前,使用分发工作流配置应用程序。在这个工作流中,Xcode允许您选择要针对开发还是生产环境,并将com.apple.developer.icloud-container-environment授权添加到您的应用程序中,并使用所选的值。在发货之前,请确保为生产环境配置应用程序。针对开发环境的应用程序将被应用程序商店拒绝。


分享到: