icloud -- Testing Your CloudKit App -- Deploying the Schema

来源:互联网 发布:nginx 正则匹配域名 编辑:程序博客网 时间:2024/05/08 01:32
Give your CloudKit app a real-world test with multiple simultaneous users by running it on multiple devices using different iCloud accounts. Both iOS and Mac apps can be configured to launch outside Xcode on designated test devices. This is the recommended way to initially test your CloudKit app. For iOS apps, you can later upload your app to iTunes Connect, which allows you to distribute your beta app to a set of iTunes Connect users, or end-users with email addresses.

To learn about the TestFlight beta feature in iTunes Connect, read Beta Testing Your iOS App in App Distribution Guide .

通过使用不同的iCloud帐户登陆多个设备上运行你的CloudKit应用来进行真实世界测试。 iOS和Mac应用程序可以被配置为Xcode的外发动对指定的测试设备。这是推荐的方式,初步测试CloudKit应用程序。对于iOS应用程序,您可以稍后上传您的应用程序在iTunes Connect,它允许你发布你的应用程序测试一组的iTunes Connect用户,或电子邮件地址的最终用户。
要了解在iTunes Connect的TestFlight测试功能,读取测试测试你的iOS应用程序的应用程序分发指南。


1.Distribute Your iOS App Using Ad Hoc Provisioning
Ad hoc provisioning allows you to run your app on test iOS devices without needed Xcode. Before exporting your app using an ad hoc provisioning profile, register all the devices you want to use for testing with Member Center. Ad hoc distribution uses the same pool of devices that you register for development, so you are limited to 100 per year. To register multiple test devices, read Registering Devices Using Member Center in App Distribution Guide .
When you export your app for ad hoc testing, you choose the development or the production environment. If you have not deployed your schema to production, as described in Copy the Development Schema to Production (page 47), choose the development environment.

1.1To archive and export your app for ad hoc testing 归档并以ad Hoc测试包导出app
1. Choose an iOS device from the Scheme toolbar menu and click Run. You can’t create an archive of a binary that is built for iOS Simulator. 在设备上运行应用.在模拟器上没法创建一个归档
2. Choose Product > Archive. 点击Product 然后Archive
The Archives organizer appears and displays the new archive.
3. In the Archives organizer, select the archive and click Export. 

4. Select “Save for Ad Hoc Deployment,” and click Next.



5. In the dialog that appears, choose a team from the pop-up menu and click Choose.
Wait while Xcode prepares the archive. If you don’t have a distribution certificate, Xcode creates one and creates an ad hoc provisioning profile for you. If a “Failed to locate or generate matching signing assets” dialog appears, wait a moment and click Try Again.
6. In the next dialog, choose a container environment from the pop-up menu and click Next.
Choose Production to access the data in the production environment.

Choose Development to access the data in the development environment.


7. Review the app, its entitlements, and its provisioning profile, and click Export.
8. Enter a filename and location for the iOS App Store Package file, and click Export.
The file has an .ipa extension.



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 you are limited to creating record types and adding attributes. 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 Roles to Other Team Members (page 50).你必须有权限修改生产环境来执行本章的任务。如果你是一个人,你是团队管理者和拥有这些特权。否则,问你的团队管理者,为您执行这些步骤,或者授予您编辑制作的特权,如分配角色描述给其他团队成员(第50页)。

When you are ready to submit your app to the store, read Submitting Your App to the Store in App Distribution Guide .当你准备提交你的应用到商店,阅读Submitting Your App to the Store in App Distribution Guide


1.Deploy the Development Schema to Production 部署开发模式用于产品
The first time you deploy your app, you copy a container’s 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 attributes that were deployed in the development environment.当您第一次部署应用程序,你复制一个容器的架构到生产环境。这包括记录类型,安全角色,和订阅类,但不是你在开发环境中创建的记录。一旦你部署架构到生产环境中,你不能删除被部署在开发环境中的记录类型和属性。

1.1To deploy a schema to production
1. In CloudKit Dashboard, click Deployment in the left column.
2. Click “Deploy to Production.”
If an indexing dialog appears, click Continue.

3. In the dialog that appears, read the message and click Deploy.



2.Verify Your Steps
Verify that the schema was copied to the production environment.
To view the production schema and data
1. In the lower-left corner, click the Development button.
2. In the dialog that appears, click Production.
The interface changes from the development to production environment.

3. Click Record Types and select the record type you want to view.



4. Click Default Zone to view public records.

3.Assign Roles to Other Team Members 给团队其他人员分配角色
For company accounts, you can delegate some of the responsibilities of deploying your CloudKit app by changing team member privileges, shown below.对于公司账户,你可以分配给一些团队成员部署CloudKit应用程序的特权职责,如下图所示。

Privilege

Description

Manage Team

Can change the privileges of other team members, except the team agent. Theteam agent always has all privileges.

Edit Development


Can edit the development schema by using CloudKit Dashboard.

Can view and edit 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.

3.1To grant privileges to team members 授予权限给团队成员

1. In CloudKit Dashboard, click Team in the left column.

2. 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.


Recap
In this chapter you learned how to deploy your development schema to the production environment and how to keep it up to date as you continue developing your app.

概括
在这一章中,你学会了如何将开发模式部署到生产环境,如何保持它最新的,继续发展你的应用程序。




0 0
原创粉丝点击