Using Xcode Cloud With Firebase
Do you know what’s the worst? A long intro.
Xcode Cloud Initial Setup
Apple did a lovely job of documenting the initial setup here.
I won’t dive into any setup details, but if you struggle at all with weird errors popping up, first ensure your Xcode & Mac OS are on the newest versions.
Customizing Workflows
Hats off to the iOS Dev Ops out there, but I couldn’t be happier to delete fastlane & move to the cloud.
My setup
I now have two Workflows:
- a debug build using Firebase’s App Distribution.
- a release build using TestFlight.
My additional needs
- Upload a build to Firebase.
- Upload dsyms to Firebase’s Crashlytics.
- Tag the build version on git.
Adding these additional features requires writing custom build scripts.
Uploading a build to Firebase
- Download the Firebase CLI script & zip it inside your ci_scripts folder.
Read over the Firebase CLI Script doc if you’re unsure how to use it. - Execute the upload in ci_post_xcodebuild.sh.
Uploading dsyms to Firebase
- Find and copy your upload-symbols script in your Crashlytics framework.
- Execute the upload in ci_post_xcodebuild.sh.
Create a git tag of the distributed version
Mic. Drop.
Often I tend around the bush, rather than beating straight through it. I have taken my personal Dev Ops nightmare, of learning how to customize Xcode Cloud as an opportunity to tersely document the intricacies of a Firebase configuration.
If in this article you missed the personal story, inside jokes, gifs, & LinkedIn plug, I’d invite you to look at any of Medium’s other blogs.