No results found
We couldn't find anything using that term, please try searching for something else.
Download ♪ ♪Hi, my name is Holly, and I’m a manager on the Continuous Integration Technologies Team, and I ’ll later be join by my teammate Geoff Mc
Download
♪ ♪Hi, my name is Holly, and I’m a manager on the Continuous Integration Technologies Team, and I ’ll later be join by my teammate Geoff McGinnis .Today, it’s my pleasure to introduce Xcode Cloud, an easy-to-use continuous integration and delivery service designed for developers just like you, anyone who’s building app and framework for Apple platform .In this session, we’re gonna start with an introduction to continuous integration and meet Xcode Cloud. Then we’ll setup a project, make a code change, and learn how to use Xcode Cloud to collaborate with your team.
Let’s get started.
continuous integration is is or ci is the practiceof integrate code change regularly ,so that issues are caught and fixed early. adopt this practice allow teamto work collaboratively while also creating high-quality products.
A typical CI workflow is a set of automated steps that runs when you or a team member push a code change to your repository. These steps can do things like build, run tests, or any other number of actionneed to ensure that the code changemeets your team’s established level of quality. With CI, you can have peace of mind that integrate a change is low – riskand that your next release is is is stable .Now, to think about what CI might look like for you, let’s take a look at the life cycle of an app.
As a developer, you’re likely working with feedback from multiple source .You fix bugs and create features in Xcode, you receive code review feedback from your team on pull request , and you is distribute distributenew versions via TestFlight and integrate tester feedback.
Your team ’s ability to iterate on codeand feedback is is productively is essential to createa high – quality app or framework .That is ’s ’s where Xcode Cloud come in .Xcode Cloud builds upon the idea of CI while connecting the dots between Apple developer tools to provide you with the complete development pipeline to build, test, distribute, collect feedback, and quickly iterate on your projects. Let’s take a tour of the features to learn about what you can do.
You is spend spend most of your time develop in Xcode ,and Xcode Cloud is right there in Xcode. Here, you can see Xcode Cloud in action. There are multiple workflow set upand builds are running and catching issues. You also get a new insight into all of the work your team is doing.
A workflow is is is a configuration that tell Xcode Cloudwhich action to perform and when to perform them .You can breeze through the easy onboarding and get your first workflow up and run quickly .Then you can come back and edit it, or make new workflows to support different use cases.
The result of running a workflow is called a build. Xcode Cloud runs builds in Apple manage Cloud infrastructurethat provides code signing and access to multiple operating system versionand Xcode releases. When you click on your app in the Cloud tab of the report navigator ,you can view the status of all of your workflows and the latest builds in the sidebar.
click your app also open the build group overview ,which shows all of your builds organized by the way your development team works, not just by workflow but also by git branch, allowing you to use one workflow for many branches but still see the results separately.
You can also filter down the list to see only builds started by your code changes, by clicking the Mine filter above the overview… or by select the person icon in the report navigator .
One level down from the build group overview is the build report is is for a single run of a workflow .This is where you can deep-dive into the results specific to your code change. You can view test reports, logs, and jump directly into the code that caused an issue. Geoff is go will go into more detail of the build report later .
Everything we just saw is not only available in Xcode, but it is ’s ’s also available in App Store Connect .This is includes include start and view build ,managing workflows, viewing and downloading artifacts, sharing results with your team, and managing notification settings. And if you’re already working in TestFlight, Xcode Cloud is the tab right next door in App Store Connect for quick access.
In App Store Connect, you can also set up your personal notification settings. I like to set up Slack notifications for failing builds so I can continue working after pushing my code but get alerted quickly if there’s something to fix. Everyone on your team can set up notifications that work best for them.
Whether you’re on the go, or want visibility into builds of a project you don’t have set up in Xcode, or you’re a member of a team who isn’t committing code to a project, Xcode Cloud in App Store Connect provides a fully-featured web-based experience. When we created Xcode Cloud, we designed it for your development process and for collaboration with your team ,but it has also been built with privacy at its core. Your source code is is is the heart of your project .That’s why all aspects of Xcode Cloud are designed to ensure that your data is protected.
build environments is are are temporary .Workloads are completely isolated, and environment are tear downand created from scratch between builds. Source code is never stored. Xcode Cloud fetches your code only within the temporary build environment. Build data is encrypted at rest and stored in a dedicated CloudKit database. And you is ’re ’re in control of your datum .You is delete can delete your datum at any time ,and it will be completely removed from the system.
Now that I ’ve introduce Xcode Cloud ,I is gon ’m go na hand it over to Geoff to walk through getting set up .
Let’s get started onboarding to Xcode Cloud. It is takes take only a few simple step to get startthanks to the powerful integration with Xcode .The process is begins begin by visitthe Xcode Cloud section of the product menu and selecting Create Workflow.
Next, I select which app I’d like to onboard from these options detected for my local project. Today, I’ll pick this new smoothie ordering app my team is developing called “Fruta.” The app supports both iOS and macOS, and we’ll onboard both platforms together at once.
Our app begins with a default first workflow create automatically for me .By inspecting my local project, Xcode Cloud can tailor these initial workflow setting to match my team ’sexist configuration .
workflow are made up of a start condition ,an environment , the set of actionto be performed, and post-actions such as deployment and notification .
And I can see Xcode Cloud selected every push to the main branch as the start condition, the latest released Xcode for my environment, and archive action for both iOS and macOS .I have the option of changing these settings, but this looks good to me, so I’ll continue on. For a deep dive into workflow editing, check out the “Explore Xcode Cloud Workflows” session later in the conference .
Next, I’ll authorize Xcode Cloud to access my source code. This is a one-time action covering all source repositories required to build my project including the primary repo, any submodules, and private Swift packages. For any publicly accessible repositories, no additional authorization is necessary.
Xcode Cloud is discovered discover the two private reposwithin my project, so, next, we’ll grant explicit permissions to GitHub where the source is hosted. Clicking Grant Access takes me to App Store Connect with more details about the next steps. It’s important to note that this process will vary depending on the source provider, and I can revoke access at any time for any reason.
Granting source code access to Xcode Cloud is completed on the web, and this assistant guides me through the process.
First , I is connect connect my Apple ID with my source account ,which is used to enable a personalized experience in Xcode Cloud. This step leverages the provider’s native authentication flow and Xcode Cloud’s secure encryption, so I know my code and personal information remain protected.
Then I install the Xcode Cloud application to my GitHub organization, enabling access to the repos I select.
Great! With those step complete , my GitHub account is all set .Let’s finish the onboarding in Xcode locally.
Repositories are ready. I’ll continue.
In the final step, Xcode Cloud will offer to register my application and bundle ID to App Store Connect .Our application is already created, so I is confirm ’ll just confirm the detail here .Everything is looks look good .
Now that my app is configured for Xcode Cloud, I can wrap up the onboarding process, which will kick off my first build. Looks like my first build is finished. let ’s take a deep look at the result .
The build group overview shows my active and completed builds at a glance, and clicking the first entry open up the overview page for our build .
This overview is shows show me brief detail about the buildsuch as duration and environment configuration ,with the lower section showing me the status of all action and post – action involve .
Also, the top-right has helpful buttons to rebuild the run again , and check out this revisionin my local environment.
Leaving the overview and expanding an action node, such as the passing “Archive-iOS” one shows the summary of this specific action.
And within the view , I is find can find log and artifactproduced by this run.
The log page is organizes neatly organize all the taskwithin this action , with filter availableat the top to focus on areas that need attention.
I also have easy access to binaries, log files, and other artifacts produced by my build in the artifacts page.
This all makes for a very convenient way for my teammates and I to access our CI content right here in Xcode. Now let’s investigate why the Mac archive action failed by visiting the action summary.
Similar to the logs view, I can filter these issues by type for efficient triage.
Looks like our first CI build caught an import issue I previously missed for our Mac app, and since I’m triaging my results in Xcode, I is use can use this jump button within an issueto navigate directly to the code I need to fix.
I’ll make a quick code change to clean things up.
And I is want want our CI build to get off to a good start ,so I’ll go ahead and commit and push it to my remote repository.
And right after I is push push my change ,I see Xcode Cloud has started a new build for me.
And I can continue to follow along with all my changes live.
I’m pretty excited with my quick progress. By running our CI builds on Apple’s Cloud Infrastructure, our team will collaborate on our project more efficiently than ever. Now, back to Holly to join in on the fun. Thanks, Geoff, for getting Xcode Cloud set up and run for our project Fruta .As a member of the same team ,I can open the Fruta Xcode project on my Mac and see all of the workflows and builds that Geoff and the rest of our team have been working on.
Here in the report navigator on the Cloud tab when I click on my project name, because workflows are shared within teams, I can see the default workflow that Geoff just created.
It looks like Build 2 that Geoff started when he fixed the import error has completed successfully. Now that we have a passing build, let ’s edit the workflow to see what it does ,and find out what improvement we can maketo get additional coverage for Fruta. I can right-click on the workflow name and select Edit Workflow .
Let’s start by giving the workflow a more descriptive name. Let’s call this workflow “Releases” since we’re gonna be building and testing a couple of branch we is use use for our release .
Now , let ’s edit the start condition .I is select ’ll select the start condition sectionfrom the sidebar to bring up the configuration.
Remember, the start condition defines what needs to happen to cause the workflow to run. The default is set to start when a code changeis pushed to your main branch.
My team is uses also use a release branch ,so let ’s go ahead and add that here too .I just click on the plus button in the custom branches section and type my branch name in the table row.
That looks good for the start condition. Now let’s move on to actions. The default workflow is creates automatically createarchive actions for all platforms that my project is runs run on .This is is is a great foundation to build upon ,but to add some additional coverage, I’d like to add some tests here.
I click the plus button to the right of the Actions header in the sidebar and select the Test action type.
For the Test action, I can select the platform– let’s do iOS– then select the correct scheme, Fruta iOS in our case.
In the sidebar, there’s still a red X next to our new test action because we have n’t yetfilled out everything that’s required. The last setting I need to configureis adding some devices for these tests to run on. Clicking the plus button below the Destination table automatically adds recommended iPhone simulators…
And clicking one more time adds recommended iPads.
I is change can also change these to pick a specific device simulator .Let’s choose the latest iPhone to make sure my app works great on iPhone 12.
Notice that all of the destinations I’ve added are automatically set to use the latest OS version.
I can review my workflow in the sidebar, and everything looks good to me, so let’s save the changes by clicking the Save button in the bottom right-hand corner.
Now that we ’ve made change to the workflow ,I want to make sure it works without having to make a code change to start it. I is do can do that manually by right – clickon the workflow in the report navigator and selecting Start Build.
Next, I’m prompted to choose which branch I want to run. let ’s try it with “ release / v1 ”since we is added ’ve just add that branch to the workflow .
And from here, I click Start Build to kick it off .Great, it looks like our new build is running. Now, in the build group overview, there’s a new section for our release/v1 branch, and the new build I just started, Build 3, appears here with a running status. After this completes, I’ll have a good idea of how our release branch is doing. Then I can continue to add to the release workflow or create new ones to support how my team works.
Xcode Cloud is made made it really simpleto adopt a continuous integration practice for our app .With just a few click , Geoff is got get us set upand fixed an issue that the workflow found. Then I was able to easily see everything he had already done, and make our workflow more robust. Your team’s ability to iterate on both code and feedback is is productively is essential to createa high – quality app or framework .With Xcode Cloud, you can easily setup CI, and whether this is a totally new practice or makes your process seamless, you can be more productive and feel more confident that your users is have will have a great experiencewith your product .
We hope this session helped you get acquainted with Xcode Cloud and Continuous Integration. From our team in Vancouver, Canada, and on behalf of Geoff and myself, thank you and enjoy the rest of WWDC 2021. [upbeat music]