Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prod & dev schemes & .xcconfig files using XcodeGen #7

Open
wants to merge 1 commit into
base: step-9
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Project/Configs/Development.xcconfig
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions Project/Configs/Production.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
//
// Production.xcconfig
// XcodeGen
//
// Created by Prescott, Ste on 02/12/2018.
//

PRODUCT_NAME = Production
PRODUCT_BUNDLE_IDENTIFIER = me.steprescott.xcodegen
21 changes: 21 additions & 0 deletions Project/Schemes/Development.yml
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions Project/Schemes/Production.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions Project/Targets/XcodeGen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ targets:
type: application
sources:
- XcodeGen
- Project/Configs
dependencies:
- carthage: Alamofire
7 changes: 7 additions & 0 deletions Project/configs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
configs:
Development: debug
Production: release

configFiles:
Development: Project/Configs/Development.xcconfig
Production: Project/Configs/Production.xcconfig
2 changes: 2 additions & 0 deletions Project/options.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
options:
bundleIdPrefix: me.steprescott
3 changes: 3 additions & 0 deletions Project/schemes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include:
- Schemes/Development.yml
- Schemes/Production.yml
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -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`

---

Expand Down
7 changes: 4 additions & 3 deletions project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include:
- Project/options.yml
- Project/targets.yml
- Project/schemes.yml
- Project/configs.yml

name: XcodeGen
options:
bundleIdPrefix: me.steprescott
name: XcodeGen