Streaming is available in most browsers,
and in the Developer app.
-
Simplify distribution in Xcode and Xcode Cloud
Discover how to share your app using Xcode's streamlined distribution, which allows you to submit your app to TestFlight or the App Store with one click. We'll also show you how to use Xcode Cloud to simplify your distribution process by automatically including notes for testers in TestFlight, and use post-action to automatically notarize your Mac apps.
Chapters
- 1:44 - Archiving for the simulator
- 2:33 - Distribute your app with new streamlined methods
- 3:06 - TestFlight internal only streamlined option
- 4:24 - Upload to App Store Connect demo
- 4:58 - TestFlight Ready to Test push notification
- 6:05 - Automation with Xcode Cloud
- 7:01 - Configuring TestFlight support in Xcode Cloud Demo
- 9:02 - Automate TestFlight What to Test with Xcode Cloud
- 11:08 - What is Notarization?
- 12:12 - Notarization with Xcode
- 12:33 - Automate Notarization with Xcode Cloud
- 13:27 - Automate Notarization with Xcode Cloud Demo
- 15:07 - Download the Notarized app from Xcode Cloud
- 15:35 - Wrap-up
Resources
- Distributing your app for beta testing and releases
- Including notes for testers with a beta release of your app
Related Videos
WWDC23
WWDC22
WWDC19
-
Download
♪ ♪ Chris: Hello, I'm Chris. In a minute, I'll be joined by Jason. Welcome to "Simplify Distribution with Xcode and Xcode Cloud." As developers, we need to iterate before we share our best work. To make a really polished app, you need to be able to quickly and easily build your app, test it, distribute it, get feedback, and integrate that feedback. Fortunately, we have the right tools for the job. You can begin by giving your app to your team, your friends, and family with TestFlight. When you feel you're ready, you can submit your app to the App Store, or you can get your app notarized by Apple and share it directly with your customers. Of course, we have great tools to distribute to these channels: You can use Xcode. The Xcode Organizer window now makes it easier than ever to distribute with one click using new streamlined options. And you can supercharge your efforts using Xcode Cloud. With Xcode Cloud, you can create a workflow to automate the building and sharing of your app whenever you push code changes. Today, I am going to show you how to send your app to testers with TestFlight. Then Jason will show you how to use Notarization for your customers on the Mac. Let's get started.
I have our "Backyard Birds" project open. I'm working on a git branch where I'm experimenting with different accent colors. I'd like to share these new red colors with my team on TestFlight. The first step to doing so, is producing an "Archive." But what is an archive? An archive is a record of your app. It is a container for an optimized release build of your app. It includes debug symbols, or "dSYMs," that can be for local symbolication. The archive's contents are ultimately repackaged depending on the destination that you choose. So how do you archive? Very simple, you use the Product menu Archive. And notice, I currently have the iPhone simulator selected. Xcode will do the smart thing and build my archive with all the CPU architectures necessary to run on any iOS device.
After Xcode has produced an Archive, the next step is to click the "Distribute App" button. New in Xcode 15, you can choose from one of several streamlined options. By choosing one of these options, you can upload or export your app easily with just one click. Now let's take a moment to explore each of these streamlined options. You can use the "TestFlight & App Store" option, which will give you the full functionality of TestFlight and the ability to submit to the App Store.
Or you can use the new "TestFlight Internal Only" option. This kind of build can be shared with your team, but can never be submitted to the App Store. This is perfect for getting feedback while you're iterating on a development branch.
If you want to export an optimized build of your app, you can use the Debugging option. This build can be installed on your team's registered devices, or you can use the Release Testing option. This option will sign your app similar to how it is signed on the App Store. This build can be installed on your team's registered devices.
Each of these streamlined options use recommended settings. These recommended settings include: Using automatic signing to re-sign your app. No configuration is necessary. Embedding app symbols for server-side crash log symbolication.
Auto-incrementing your app build number to get it ready for the App Store. And stripping symbol information from Swift embedded dylibs. This will make your app smaller.
If you need something that isn't available as a streamlined option, you can always choose "Custom." "Custom" will allow you to choose from more than just the recommended settings. All right, I am ready to send this build to some members of my team. Because I'm just trying out some changes quickly, and I don't want this build ever going to the App Store, I'll select the "TestFlight Internal Only" option and click distribute.
And that's it. I don't have to answer any questions. Xcode will just do the right thing.
Xcode is repackaging the app, re-signing it, including symbols, and uploading to TestFlight. And just like that, the app is uploaded. Later, after my app has been uploaded and processed, I get this nice new notification letting me know the app is ready to test. After my build has completed processing, I can go into App Store Connect in Safari. From there, I can visit my app "Backyard Birds" in TestFlight to edit the Test Details. When my team uses TestFlight on their devices, they can read all about what to test for this new build. And they can use TestFlight to send me a screenshot with text feedback. I can later view that feedback in the Xcode Organizer window. Here in the Feedback tab of the Xcode Organizer, Jason has sent me a screenshot with a message. It seems he doesn't much care for the red colored buttons. Oh, no, that's not good. I guess we have more work to do.
We've accomplished a lot. We just used Xcode to archive a build of our app and upload it to TestFlight with one click. We gave our team some notes on what to test and received some feedback. We are on our way to building and refining a great app. Building and distributing your app can be a lot to juggle. Xcode Cloud automates the task of distribution, allowing you to focus on development. Xcode Cloud is the Continuous Integration and Delivery service built by Apple. It's been specially designed for Apple developers. I'd like to set up Xcode Cloud to automatically create a build when I submit changes to a feature branch, send that build to TestFlight, and include notes on what to test. To do all this, I can use an Xcode Cloud Workflow. I've already added a workflow for our app. We're going to edit it to add TestFlight support. We'll first use the Integrate menu to manage a workflow. We'll edit the archive action to add TestFlight support. And we'll add a post-action to the workflow, to send the build to a group of internal testers. Let's dive in. I'll begin by clicking on the new Integrate menu and Manage Workflows.
I'll select the "Internal Feedback" workflow that I've previously been working on, and I'll use the gear button to edit the workflow.
I've previously configured this workflow to be started whenever changes occur on branches beginning with the string "features/." That includes the accent_color feature branch that I'm working on. To begin deploying to TestFlight, I'll edit the Archive action. Now, I've designated this workflow for features that I'm prototyping. I'm not interested in these builds ever going to the App Store, so I will choose "TestFlight (Internal Testing Only)." I want to share these builds only with select members of my team. To do that, I'll add a TestFlight Internal Post-Action. And I'll add the TestFlight group that's interested in these new features. I've called them "Birds of a Feather." I'll "add," "save"...
And "done." Now we're all set up and ready to go. Whenever I push changes to this accent_color branch, a new build will be sent to the "Birds of a Feather" group. Let's try adjusting the accent color and pushing the changes. I think I'll change the accent color from red to purple and build and run in the simulator to check it out.
The purple buttons are looking better to me. Let's hope Jason agrees. To push these changes, I'll use the Integrate menu and click commit.
I can now review the files changed. In this first file, "Contents.json," I've changed the accent color from red to purple. That makes sense. I am also working on a custom build script. This script is used by Xcode Cloud to collect git commit messages and include them as test details for my build on TestFlight. This is super cool. Xcode Cloud can now automatically update your notes for What to Test. To learn more about how to set this up, check out the developer documentation for "Including notes for testers with a beta release of your app." This documentation features the build script I'm using. I will add a commit message, "Buttons are now purple." That'll make it clear to my team what I've changed. I'll stage all these changes by clicking the "Stage All" button. I'll use the "Commit" drop-down button to commit and push. And click push to upload to the remote repository. That's it. With that push, Xcode Cloud is archiving and deploying to TestFlight.
Later, I can review the build in the Reports Navigator.
I'll select the most recent build under the "Internal Feedback" workflow. And thank goodness, the archive action and the TestFlight internal testing post-action were successful. If I check out our build in TestFlight on my device, it includes the helpful testing note, "Buttons are now purple." And what do we have here? Jason has sent some feedback to the Organizer window. It seems he likes the new purple buttons. All right, I guess we can keep them. Fantastic. We now have an ideal setup. With the help of Xcode Cloud, any time I push changes to this feature branch, team will receive a new build of my app with useful information on What to Test. I can now continuously integrate feedback and deploy improvements. I'm now freed up to focus on development and ship the best possible result. Okay, we've learned a lot about distributing our app with TestFlight using Xcode and Xcode Cloud. Now Jason will show us all about using Notarization. Jason: Thanks, Chris. The App Store is a great way to reach Apple customers, but if you want to host and sell your Mac app directly, you can get your app notarized. Notarizing your app will give users confidence that the safety of your software has been verified by Apple. So how does notarization work? You start by producing an archive of your app and uploading it to Apple's notary service, where it is scanned for malicious content. Once that process is complete, the notary service produces a ticket, which can be stapled to your app. Now your notarized app is ready to be distributed to customers.
When your app is launched for the first time, macOS will verify that the app has been checked by Apple. This is done by examining both the stapled ticket and the ticket provided by reaching out to the notary service. To learn more about notarization, check out the WWDC sessions "All About Notarization" and "What's new in notarization for Mac apps" from previous years.
In order to notarize your app from Xcode, start by producing an archive. As Chris showed us earlier, we can access the new streamlined distribution options by opening the Organizer window in Window, Organizer, selecting our app archive, and clicking Distribute App. The Direct Distribution option will notarize your app. So far, I've been using Xcode for notarization. This year, to help automate this process, we've added support for notarization to Xcode Cloud.
After setting up a notarization workflow, Xcode Cloud will automatically start a build based on the configured start conditions. Once the notarized app is ready, you can download it directly from Xcode Cloud. I've already configured a release workflow for our Mac app. Whenever a change is pushed to our release branch, automated tests are run, and an archive is produced. I'll update the workflow to notarize our app as well.
Only admins and app managers can set up workflows that notarize, so make sure you have the right permissions.
Since I'll be using Xcode Cloud for notarization, I'll click Cancel and close the Organizer window.
I'll start by going to the Cloud tab of the Reports navigator in the sidebar.
To edit the macOS Release workflow, I'll secondary-click it and select Edit Workflow.
You'll notice that the Archive action is already configured. Let's add the new Notarize post-action by clicking plus and Notarize.
I'll update the workflow's description to reflect this additional step.
And that's it. I'll click Save to save these changes to the workflow.
I think our Mac app is in great shape, especially with the new purple buttons, so I'm ready to start the notarization process using our updated workflow. I can do that by secondary-clicking our workflow and selecting Start Build.
I'll select our release branch and click Start Build to queue up a build.
You'll notice that the Test and Archive actions are queued, and once those are complete, the newly-added Notarize post-action will run.
While Xcode Cloud processes our build, let's take a closer look at the build report.
When an Xcode Cloud build is in progress, the build overview shows a summary of everything that will happen in this build.
If you want to work on something else in the meantime, the Cloud tab of the Reports navigator will display statuses for all your builds as they run and allow you to navigate to the detailed results.
Let's check on the status of our build.
Excellent! Our new Notarize post-action has completed successfully. I'll click "Download Notarized App" to start the download.
Once the download is complete, clicking View Notarized App reveals the downloaded archive, which we can uncompress to reveal our notarized app.
Now I'm ready to share it with our users.
Today, we've shown you how to use different tools to make sure you're delivering the best version of your app. Xcode's new streamlined distribution options will allow you to quickly upload your apps.
TestFlight Internal distribution is a great way to iterate on changes, allowing a limited audience to try out your app and provide valuable feedback. Xcode Cloud workflows help automate the distribution process and make it even easier to distribute outside of the App Store with support for notarizing your Mac apps.
We think these enhancements to app distribution will allow you to save valuable time, so you can focus on what you do best, building great apps. Thank you for watching. ♪ ♪
-
-
8:50 - Use Xcode Cloud to add a Git commit message to TestFlight What to Test
#!/bin/zsh # ci_post_xcodebuild.sh if [[ -d "$CI_APP_STORE_SIGNED_APP_PATH" ]]; then TESTFLIGHT_DIR_PATH=../TestFlight mkdir $TESTFLIGHT_DIR_PATH git log -1 --pretty=format:"%s" >! $TESTFLIGHT_DIR_PATH/WhatToTest.en-US.txt fi
-
-
Looking for something specific? Enter a topic above and jump straight to the good stuff.
An error occurred when submitting your query. Please check your Internet connection and try again.