iOS App Build Setting Differences between Debug and Distribution

| | August 8, 2015

For an iPhone/iPad app, what build settings do you make differently between the Debug and Distribution build? Please note any unique settings that you would do for iPhone only apps and iPad only apps.

Here is what I am doing currently (some already set by default by Xcode), but would like to gather an exhaustive list. The usual path stuff is not included in the list.

For adhoc and App Store distribution build:

  • Enable Validate Build Product
  • Set Optimization Level to fastest and
  • Assign Entitlements.plist to Code Signing Entitlements
  • Strip Debug Symbols During Copy
  • Add NS_BLOCK_ASSERTIONS=1 to “Other C Flags”
  • For iPad only app, set Architectures and Valid Architectures to Optimized (arm7)

For debug build:

  • Add DEBUG to Preprocessor Macros.

2 Responses to “iOS App Build Setting Differences between Debug and Distribution”

  1. Daniel Dickison on November 30, -0001 @ 12:00 AM

    Recently I discovered that LLVM 2.0 (sometimes?) produces buggy executables for 1st-generation iOS devices, but it’s faster and nicer to develop with LLVM than GCC, so I set Debug builds to use LLVM and Release builds to use LLVM-GCC.

    Also, I don’t think manually setting Entitlements has been necessary for some time now. Xcode seems to automatically apply the correct entitlements for ad-hoc builds.

  2. André Morujão on November 30, -0001 @ 12:00 AM

    In a Debug build, I also usually set the preprocessor macro DEBUG and then use a macro like DLog instead of NSLog for all of my logging.

Leave a Reply