how do I deploy changes to cloud kit

Asked on 08/12/2024

1 search

To deploy changes to CloudKit, you can utilize Xcode Cloud workflows to automate the process. Here's a general overview based on the session "Extend your Xcode Cloud workflows":

  1. Set Up Xcode Cloud: Ensure your project is configured with Xcode Cloud. This involves setting up workflows that can be triggered by code changes.

  2. Use Webhooks: You can configure webhooks in Xcode Cloud to automatically respond to build events. This allows you to connect your test results to a deployment service, which can then push server changes to production automatically when they pass. You can set up a webhook by going to the Xcode Cloud view in App Store Connect, selecting your app, and configuring a new webhook under the settings.

  3. Automate with App Store Connect API: Use the App Store Connect API to automate the start of builds whenever there are new changes in your test server. This involves using endpoints like CI buildruns to create new Xcode Cloud builds and specifying the workflow and git reference you want to build.

  4. Monitor and Validate: Once the integration tests pass, the changes can be deployed to production. If any issues arise, the webhook listener will prevent the changes from being deployed, ensuring only validated changes reach production.

For more detailed steps, you can refer to the session Extend your Xcode Cloud workflows (16:35) which covers the use of webhooks and the App Store Connect API in detail.