Skip to content

Commit 2a2e02f

Browse files
committed
Step 10
1 parent d0ff66b commit 2a2e02f

File tree

10 files changed

+79
-7
lines changed

10 files changed

+79
-7
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//
2+
// Development.xcconfig
3+
// XcodeGen
4+
//
5+
// Created by Prescott, Ste on 02/12/2018.
6+
//
7+
8+
PRODUCT_NAME = Dev
9+
PRODUCT_BUNDLE_IDENTIFIER = me.steprescott.xcodegen-dev
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
//
2+
// Production.xcconfig
3+
// XcodeGen
4+
//
5+
// Created by Prescott, Ste on 02/12/2018.
6+
//
7+
8+
PRODUCT_NAME = Production
9+
PRODUCT_BUNDLE_IDENTIFIER = me.steprescott.xcodegen

Project/Schemes/Development.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
schemes:
2+
Development:
3+
build:
4+
parallelizeBuild: true
5+
targets:
6+
XcodeGen: all
7+
XcodeGenTests: testing
8+
XcodeGenUITests: testing
9+
run:
10+
config: Development
11+
test:
12+
config: Development
13+
targets:
14+
- XcodeGenTests
15+
- XcodeGenUITests
16+
profile:
17+
config: Development
18+
analyze:
19+
config: Development
20+
archive:
21+
config: Development

Project/Schemes/Production.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
schemes:
2+
Production:
3+
build:
4+
parallelizeBuild: true
5+
targets:
6+
XcodeGen: all
7+
XcodeGenTests: testing
8+
XcodeGenUITests: testing
9+
run:
10+
config: Production
11+
test:
12+
config: Production
13+
targets:
14+
- XcodeGenTests
15+
- XcodeGenUITests
16+
profile:
17+
config: Production
18+
analyze:
19+
config: Production
20+
archive:
21+
config: Production

Project/Targets/XcodeGen.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@ targets:
44
type: application
55
sources:
66
- XcodeGen
7+
- Project/Configs
78
dependencies:
89
- carthage: Alamofire

Project/configs.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
configs:
2+
Development: debug
3+
Production: release
4+
5+
configFiles:
6+
Development: Project/Configs/Development.xcconfig
7+
Production: Project/Configs/Production.xcconfig

Project/options.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
options:
2+
bundleIdPrefix: me.steprescott

Project/schemes.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include:
2+
- Schemes/Development.yml
3+
- Schemes/Production.yml

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
# XcodeGen
22

3-
### Step 9
4-
This step we want to add Alamofire via Carthage as a dependency on the main target.
5-
6-
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.
3+
### Step 10
4+
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.
75

86
---
97

project.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
include:
2+
- Project/options.yml
23
- Project/targets.yml
4+
- Project/schemes.yml
5+
- Project/configs.yml
36

4-
name: XcodeGen
5-
options:
6-
bundleIdPrefix: me.steprescott
7+
name: XcodeGen

0 commit comments

Comments
 (0)