iOS Dev Nugget 52 Set Up Crashlytics For Ad Hoc and App Store Builds Only


Need to run a code review on your codebase? Hire me

Crashlytics is an excellent and free tool for developers to capture crash logs when our apps crash both during testing or production.

Once you have Crashlytics integrated into your Xcode project, it will try to upload to its servers every time you create a build, including debug builds. I like to do frequent builds especially when I am testing features or screen layouts that I'm not familiar with. Having Crashlytics attempt to upload every time can put a drain on battery power and network bandwidth (if tethering).

To make Crashlytics ignore debug builds, in your Run Script phase for running Crashlytics, instead of doing:

./Crashlytics.framework/run <app id>

Use this instead:

if [ "$CONFIGURATION" != "Debug" ]; then
  ./Crashlytics.framework/run <app id>

Make sure the string "Debug" matches the Build Configuration you want to ignore.

Your feedback is valuable: Do you want more nuggets like this?   Yes   or   No



Like this and want such iOS dev nuggets to be emailed to you, weekly?

Sign Me Up! or follow @iosdevnuggets on Twitter


View archives of past issues