swift Swift - CloudKit - 部署架构
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了swift Swift - CloudKit - 部署架构相关的知识,希望对你有一定的参考价值。
See:https://developer.apple.com/library/content/documentation/DataManagement/Conceptual/CloudKitQuickStart/DeployingYourCloudKitApp/DeployingYourCloudKitApp.html
Deploying the Schema
After you finalize your schema and test your app in the development environment, you are ready to deploy the schema to production. Deployment promotes the schema to the production environment, but it doesn’t copy the records in the development environment to the production environment. Therefore, after deployment, populate the production environment with records as needed. Then test your app in the production environment. You can continue making changes to the schema in the development environment, but after deploying the schema, you are limited to creating record types and adding fields. Indexes are part of the schema so need to be deployed similar to record type changes. The next time you deploy the development schema, the changes are merged with the production schema.
You must have privileges to edit the production environment to perform the tasks in this chapter. If you are an individual, you are the team admin and have these privileges. Otherwise, ask your team admin to perform these steps for you, or to grant you the Edit Production privilege, as described in Assign Privileges to Other Team Members.
After deploying the schema, upload your app to iTunes Connect, as described in Uploading Your App to iTunes Connect in App Distribution Guide, and for iOS and tvOS apps, distribute your app for testing using TestFlight, as described in Distributing Your App Using TestFlight (iOS, tvOS, watchOS). When you are ready to submit your app to the store, read Submitting Your App.
Deploy the Development Schema to Production
The first time you deploy your app, CloudKit copies the container schema to the production environment.
This includes the record types, security roles, and subscription types, but not the records that you
created in the development environment. Once you deploy your schema to the production environment,
you can’t delete record types and fields that were deployed in the development environment.
Warning: To view records in production, enable the ID metadata index for the associated record types
before following these steps, described in Advanced Local Caching. You can’t change the metadata
indexes in the production environment.
To deploy a schema to production
In CloudKit Dashboard, click "Deploy to Production…” button.
Review the changes that are going to be deployed.
Click “Deploy Changes.”
Verify Your Steps
Verify that the schema was copied to the production environment.
To view the production schema and data
Click Data in the Production Environment.
Click Record Types in the tab bar.
Select the record type you want to view.
Assign Privileges to Other Team Members
For organizations, you can delegate some of the responsibilities of deploying your CloudKit app
by changing team member privileges:
Manage Team
Can change the privileges of other team members, except the team agent. The team agent
always has all privileges.
Edit Development
Can edit the development schema by using CloudKit Dashboard.
Can view records in development.
Edit Production
Can deploy the development schema to production.
Can view the production schema.
Can view and edit records in production.
You set the team member privileges separately for each container. The privileges don’t apply to all containers belonging to a team.
To grant privileges to team members
In CloudKit Dashboard, within the apppropriate container, click “Container Permissions…” in the
upper right corner.
In the row of the team member and Privileges column, select the privileges you want to grant to
the team member.
If a privilege can’t be changed or you don’t have permission to change it, the checkbox is disabled.
以上是关于swift Swift - CloudKit - 部署架构的主要内容,如果未能解决你的问题,请参考以下文章
swift Swift - CloudKit - 获取用户ID