As you probably know, Xcode comes with additional command line tools which can be installed either in the downloads part of Xcode properties or, if you're about to leave its lovely UI in favour of the terminal window anyway, you can start executing the command right away:
You now got yourself a UI-less version of your favourite app. It's totally worth it. If you want to learn about its great features you type:
I'll brief you on my favourite two lines that are just enough to clean build, archive, sign with provisioning profile and export your app into a portable .ipa file. The tool is really made simple so the lines are pretty much self-explanatory:
This will clean build the code and archive results into your current archive directory (it'll show up in the Xcode organiser). If you want it in any other place you just specify the custom path:
Then the following command will export the generated archive into a runnable ipa file, signed with the provisioning profile of your choice:
These two commands alone can save you hours of work, but things can get even better.
The irreplaceable Mattt Thompson wrote his own command line utility on top of xcodebuild to make the whole process even simpler.
Shenzhen is a set of tools for building and distributing iOS Apps. You install it with:
To create a new ipa with default settings, signed with provisioning profile of your choice, you do:
It'll generate both ipa and dSYM debug symbol store files for you to upload to any distributing channel. If you don't want to do it manually, here is the best part:
I'll package and push a new version straight to HockeyApp, or a similar service, Shenzhen now supports the following: iTunes Connect, HockeyApp, Crashlytics Beta, DeployGate, Fly It Remotely, Amazon S3 and an FTP / SFT host.
It has a wide range of additional options to support all the custom settings you may want to include (discover them with the usual -- help option). It'll also upload the corresponding dSYM file for your crash logs to be readable.
That's it!
The task that was always a Russian roulette for me, is now one that has become a really simple one. I don't know exactly what hides behind the Xcode UI, but it seems that it does not serve the purpose.
This discovery already saved me a lot of time and, unlike the Xcode UI way of doing things, it'll only get better and better.
A senior iOS developer who is part of an agile iOS team and empowers individuals in achieving their dreams and goals.
People who read this post, also found these interesting: