참고: https://medium.com/@aliakhtar_16369/managing-different-environments-using-xcode-build-schemes-and-configurations-af7c43f5be19
- Project – Configurations –
Dev
추가 - New Scheme 메뉴에서 새 scheme 추가
- 생성한 scheme 의 edit scheme – run – Build configuration – Dev 선택
- 다른 앱으로 설치하고 싶다면 , Target – Build Settings – Product Bundle Identifier – Dev의 값 맨 뒤에
.dev
추가 - Target – Build Settings – Product Name – Dev 의 값 맨 뒤에
.dev
추가 - Target – Build Settings – Active Compilation Conditions – Dev 를
DEV
로 변경
사용법
#if DEV print("======= DEV") #else print("======= else") #endif
타겟 복제는 타겟이 여러 개가 되기 때문에, 파일 추가할 때마다 타겟 갯수만큼 Target Membership을 선택해줘야하는데, 이건 타겟 갯수는 그대로라서 좀 더 편하다.