Git Taggin’

Pat DeSantis
Feb 16, 2016 · 4 min read

The importance of tagging your iOS builds

Image for post
Image for post
Photo Credit

What?

Image for post
Image for post
A pack of the elusive Git tags, as rendered by the very excellent Tower app.

That looks neat, but why should I bother?

1. So you can actually use crash reports

2. Upgrade Flow Testing

Seriously, though, have you ever looked around at a concert? The “guy still running iOS 6” is as much of a trope as the “tall guy who stands in front of you.”

Therefore, whenever you release an update, it’s important to test the upgrade flow from all previous versions, not just the most recent one. This is especially important if you’re using Core Data. You need to make sure there are no changes to previously released model versions. I have seen too many apps release updates that have a mistake in, resulting in a flurry of 1-star “they deleted all my stuff!!” reviews.

3. Play nice with iTunes Connect & TestFlight

Image for post
Image for post
The dreaded ITMS-90188

Avoid this hassle by integrating an automatic versioning tool into your build system.

How?

I’d love to tell you I built this awesome tool that makes this process super easy. But I don’t want to lie to you. I built an okay tool that makes this process easier.

Then I discovered Fastlane, which makes this, and countless other iOS automation tasks, super easy and painless. With a single terminal command,

fastlane beta

I can enjoy this nice, tasty carnitas burrito.

Image for post
Image for post
Photo by Jinxi Eats

Meanwhile, the script takes care of the boring stuff:

  • Update Cocoapods
  • Increment the build number
  • Archive
  • Commit, tag, and push in Git
  • Upload to iTunes Connect
  • Release to External TestFlight Beta Testers
  • Post in Slack (because who doesn’t love Slack integrations)

You can view my Fastfile here, or my janky Ruby gem (aka “jrem”) here.

Protip

{label}/{version_number}/{build_number}

The “label” helps you differentiate different release types, such as beta releases vs. App Store releases. The /’s allow Git interfaces to create hierarchical lists. Spoken from experience, it sucks to scroll through 1000s of tags to try and find the exact one that you want, while your coworkers shout from the distance “Use the command line!”

Image for post
Image for post
Image for post
Image for post
Left: 10 out of 1,791 tags our CI system created, with no hierarchical navigation. Right: A nicely organized, collapsable list.

So there you have it, folks! With a little bit of automation and organization, you can save yourself time and focus on what really matters. Now if you’ll excuse me, that burrito is calling.


Thank you for reading! If you like this article, please take a moment to click the Share or Recommend button so more people will be able to read it.

Image for post
Image for post

To read more of my writing, check out my other stories.

Lastly, you can follow me on Twitter, where I talk alot about iOS design & development.

P.S. — Special thanks to @KrauseFx and the Fastlane team for all their hard work!

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store