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

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.

概括
在這一章中,你學會了如何將開發模式部署到生產環境,如何保持它最新的,繼續發展你的應用程序。




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章