From 02cced526843174edeeaeef5b50eab558a17bd88 Mon Sep 17 00:00:00 2001 From: Ste Prescott Date: Sun, 2 Dec 2018 17:58:32 +0000 Subject: [PATCH] Step 10 --- Project/Configs/Development.xcconfig | 9 +++++++++ Project/Configs/Production.xcconfig | 9 +++++++++ Project/Schemes/Development.yml | 21 +++++++++++++++++++++ Project/Schemes/Production.yml | 21 +++++++++++++++++++++ Project/Targets/XcodeGen.yml | 1 + Project/configs.yml | 7 +++++++ Project/options.yml | 2 ++ Project/schemes.yml | 3 +++ README.md | 10 ++++------ project.yml | 7 ++++--- 10 files changed, 81 insertions(+), 9 deletions(-) create mode 100644 Project/Configs/Development.xcconfig create mode 100644 Project/Configs/Production.xcconfig create mode 100644 Project/Schemes/Development.yml create mode 100644 Project/Schemes/Production.yml create mode 100644 Project/configs.yml create mode 100644 Project/options.yml create mode 100644 Project/schemes.yml diff --git a/Project/Configs/Development.xcconfig b/Project/Configs/Development.xcconfig new file mode 100644 index 0000000..cf21582 --- /dev/null +++ b/Project/Configs/Development.xcconfig @@ -0,0 +1,9 @@ +// +// Development.xcconfig +// XcodeGen +// +// Created by Prescott, Ste on 02/12/2018. +// + +PRODUCT_NAME = Dev +PRODUCT_BUNDLE_IDENTIFIER = me.steprescott.xcodegen-dev diff --git a/Project/Configs/Production.xcconfig b/Project/Configs/Production.xcconfig new file mode 100644 index 0000000..ccc2543 --- /dev/null +++ b/Project/Configs/Production.xcconfig @@ -0,0 +1,9 @@ +// +// Production.xcconfig +// XcodeGen +// +// Created by Prescott, Ste on 02/12/2018. +// + +PRODUCT_NAME = Production +PRODUCT_BUNDLE_IDENTIFIER = me.steprescott.xcodegen diff --git a/Project/Schemes/Development.yml b/Project/Schemes/Development.yml new file mode 100644 index 0000000..2efd66c --- /dev/null +++ b/Project/Schemes/Development.yml @@ -0,0 +1,21 @@ +schemes: + Development: + build: + parallelizeBuild: true + targets: + XcodeGen: all + XcodeGenTests: testing + XcodeGenUITests: testing + run: + config: Development + test: + config: Development + targets: + - XcodeGenTests + - XcodeGenUITests + profile: + config: Development + analyze: + config: Development + archive: + config: Development \ No newline at end of file diff --git a/Project/Schemes/Production.yml b/Project/Schemes/Production.yml new file mode 100644 index 0000000..9dcd58b --- /dev/null +++ b/Project/Schemes/Production.yml @@ -0,0 +1,21 @@ +schemes: + Production: + build: + parallelizeBuild: true + targets: + XcodeGen: all + XcodeGenTests: testing + XcodeGenUITests: testing + run: + config: Production + test: + config: Production + targets: + - XcodeGenTests + - XcodeGenUITests + profile: + config: Production + analyze: + config: Production + archive: + config: Production \ No newline at end of file diff --git a/Project/Targets/XcodeGen.yml b/Project/Targets/XcodeGen.yml index 0fb9310..d06303e 100644 --- a/Project/Targets/XcodeGen.yml +++ b/Project/Targets/XcodeGen.yml @@ -4,5 +4,6 @@ targets: type: application sources: - XcodeGen + - Project/Configs dependencies: - carthage: Alamofire \ No newline at end of file diff --git a/Project/configs.yml b/Project/configs.yml new file mode 100644 index 0000000..5c73f5b --- /dev/null +++ b/Project/configs.yml @@ -0,0 +1,7 @@ +configs: + Development: debug + Production: release + +configFiles: + Development: Project/Configs/Development.xcconfig + Production: Project/Configs/Production.xcconfig \ No newline at end of file diff --git a/Project/options.yml b/Project/options.yml new file mode 100644 index 0000000..ae1ac0a --- /dev/null +++ b/Project/options.yml @@ -0,0 +1,2 @@ +options: + bundleIdPrefix: me.steprescott \ No newline at end of file diff --git a/Project/schemes.yml b/Project/schemes.yml new file mode 100644 index 0000000..08dfde1 --- /dev/null +++ b/Project/schemes.yml @@ -0,0 +1,3 @@ +include: + - Schemes/Development.yml + - Schemes/Production.yml \ No newline at end of file diff --git a/README.md b/README.md index 8106565..9a914f9 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,14 @@ # XcodeGen -### Step 9 -This step we want to add Alamofire via Carthage as a dependency on the main target. - -With a **5 line change**, that includes adding the Cartfile, Cartfile.resolved, the change to the `.yml` & adding `import Alamofire` into the `AppDelegate.swift,` we have added a new dependency and it has been linked up correctly and the correct settings and run build phase added. +### Step 10 +In this step we have added a `Development` & `Production` scheme that will allow us to change settings via `.xcconfig` files. Again, all of the work was done in `.yml` files that are easier to understand when code reviewing. --- ### Next -Please now checkout `step-10` +Please now checkout `step-11` -`git checkout tags/step-10` +`git checkout tags/step-11` --- diff --git a/project.yml b/project.yml index 34e03cb..f260fb6 100644 --- a/project.yml +++ b/project.yml @@ -1,6 +1,7 @@ include: + - Project/options.yml - Project/targets.yml + - Project/schemes.yml + - Project/configs.yml -name: XcodeGen -options: - bundleIdPrefix: me.steprescott \ No newline at end of file +name: XcodeGen \ No newline at end of file