Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Project Organization for a Modern Xcode App

Project Organization for a Modern Xcode App

It’s easy to just throw more targets at a project, but since Xcode 4 there have been nicer ways to organize your project and build settings for larger apps. This isn’t a deep dive into targets/workspaces/schemes (oh my, the pain!) but rather a simpler overview of using them all together to pull off some very common use-cases in modern projects.

Curtis Herbert

January 09, 2014
Tweet

More Decks by Curtis Herbert

Other Decks in Programming

Transcript

  1. Target Apple: “Instructions for building one product”! Translation: A product/app/

    executable. • Which source files? • Build steps (link libraries, compile, copy resources, etc) • Build settings like provisioning profile, preprocessor macros • Executable information like name, ID, icons, etc
  2. Build configuration Method to customize a target’s build settings #ifdef

    DEBUG For example: • Provisioning profile • App icon • App name • Bundle ID • Preprocessor macros
  3. When do you want another target? Two distinct apps with

    (some) shared code.! ! Test harness, for example. Isolate test code from normal builds.
  4. Scheme Apple: “Instructions for building targets and performing actions”! Translation:

    what to do when you build, run, archive, etc • Which target(s) to build? • Which build configuration? • Diagnostic flags like zombie objects, command-line arguments
  5. Further reading WWDC 2011 - 313: Mastering schemes in Xcode

    4 ! “Unique icons for debug, beta, and App Store builds in Xcode 5” - http://blog.consumedbycode.com