LoginSignup
86
87

More than 5 years have passed since last update.

iOSの環境変数(Configuration, Build Settings, Plist)で知っておくべきこと

Last updated at Posted at 2014-03-06

Project > Info > Configuration

  • アプリ環境の使い分けを書く
  • 例) DebugとかReleaseとかQA(Quality Assurance)

スクリーンショット 2014-03-06 13.15.42.png

Project > Build Settings > Apple LLVM 5.0 - Preprocessing

  • Preprocessor MacrosにそれぞれのConfigurationごとに定数を設定できる
  • 例) Debugの項目にDEBUG=1、QAの項目にQA=1を入れる
  • アプリの中では以下のように使う。(例でTestFlightをQAのときのみ読み込む)
#ifdef QA
    #import "TestFlight.h"
#endif

スクリーンショット 2014-03-06 13.15.32.png

Target > Build Settings > User-Defined

スクリーンショット 2014-03-06 14.31.54.png

Supporting Files > Info.plist

  • user定義から定数を作るときなどに使う

スクリーンショット 2014-03-06 14.40.38.png

86
87
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
86
87