xcake 0.8.3 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/xcake/version.rb +1 -1
- data/xcake.gemspec +1 -1
- metadata +1 -35
- data/docs/Cakefile.md +0 -509
- data/docs/Getting Started.md +0 -65
- data/docs/Hooks.md +0 -14
- data/docs/Xcode Project Support.md +0 -51
- data/example/app/CakeMania/CakeMania.xcodeproj/project.pbxproj +0 -973
- data/example/app/CakeMania/CakeMania.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- data/example/app/CakeMania/CakeMania.xcodeproj/project.xcworkspace/xcuserdata/maxim.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/example/app/CakeMania/CakeMania.xcodeproj/xcshareddata/xcschemes/CakeMania-AppStore.xcscheme +0 -91
- data/example/app/CakeMania/CakeMania.xcodeproj/xcshareddata/xcschemes/CakeMania-Debug.xcscheme +0 -91
- data/example/app/CakeMania/CakeMania.xcodeproj/xcshareddata/xcschemes/CakeMania-Production.xcscheme +0 -91
- data/example/app/CakeMania/CakeMania.xcodeproj/xcshareddata/xcschemes/CakeMania-RC.xcscheme +0 -91
- data/example/app/CakeMania/CakeMania.xcodeproj/xcshareddata/xcschemes/CakeMania-Staging.xcscheme +0 -91
- data/example/app/CakeMania/CakeMania.xcodeproj/xcuserdata/maxim.xcuserdatad/xcschemes/CakeManiaTst.xcscheme +0 -56
- data/example/app/CakeMania/CakeMania.xcodeproj/xcuserdata/maxim.xcuserdatad/xcschemes/CakeManiaUITst.xcscheme +0 -56
- data/example/app/CakeMania/CakeMania.xcodeproj/xcuserdata/maxim.xcuserdatad/xcschemes/xcschememanagement.plist +0 -72
- data/example/app/CakeMania/Cakefile +0 -398
- data/example/app/CakeMania/Info/CakeMania.plist +0 -38
- data/example/app/CakeMania/Info/CakeManiaTst.plist +0 -22
- data/example/app/CakeMania/Info/CakeManiaUITst.plist +0 -22
- data/example/app/CakeMania/Res/CakeMania-test.entitlements +0 -10
- data/example/app/CakeMania/Res/CakeMania.entitlements +0 -10
- data/example/app/CakeMania/Res/CakeMania.xcassets/AppIcon.appiconset/Contents.json +0 -48
- data/example/app/CakeMania/Src/AppDelegate.swift +0 -46
- data/example/app/CakeMania/Src/Base.lproj/LaunchScreen.storyboard +0 -27
- data/example/app/CakeMania/Src/Base.lproj/Main.storyboard +0 -26
- data/example/app/CakeMania/Src/ObjC/CakeMania-Bridging-Header.h +0 -3
- data/example/app/CakeMania/Src/ObjC/Prefix.pch +0 -14
- data/example/app/CakeMania/Src/ViewController.swift +0 -25
- data/example/app/CakeMania/Tst/Main.swift +0 -36
- data/example/app/CakeMania/UITst/Main.swift +0 -36
- data/example/framework/Cakefile +0 -133
- data/gemfiles/Gemfile.xcodeproj-1.3.x +0 -5
- data/gemfiles/Gemfile.xcodeproj-1.4.x +0 -5
- data/gemfiles/Gemfile.xcodeproj-edge +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f39de7bfa89b96bd1a3708488d2e1e658dd438e
|
4
|
+
data.tar.gz: 4fcd070e3ddc8e2e276adc8e17649752efd1269c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 333ded28cd7b249d64ada8eb9e682e644bb240f9a34fa507b936e9562d168d3c7460aea2d578c5dde4a234dd5824e40db590fdb2828fa63c3659700d7ca54697
|
7
|
+
data.tar.gz: e18c3f87bf41e66205a3bf045c9250d9e46af0c48a267ed9bd625111ed3d59b5869bfb62ab14ccdfceafb8ca70e66f9ce15fb877c59f23b0adf0007f80a0c58f
|
data/CHANGELOG.md
CHANGED
data/lib/xcake/version.rb
CHANGED
data/xcake.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.homepage = 'https://github.com/jcampbell05/xcake/'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
17
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|example|docs|gemfiles)/}) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.executables = %w(xcake)
|
20
20
|
spec.require_paths = ['lib']
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Campbell
|
@@ -213,37 +213,6 @@ files:
|
|
213
213
|
- bin/console
|
214
214
|
- bin/setup
|
215
215
|
- bin/xcake
|
216
|
-
- docs/Cakefile.md
|
217
|
-
- docs/Getting Started.md
|
218
|
-
- docs/Hooks.md
|
219
|
-
- docs/Xcode Project Support.md
|
220
|
-
- example/app/CakeMania/CakeMania.xcodeproj/project.pbxproj
|
221
|
-
- example/app/CakeMania/CakeMania.xcodeproj/project.xcworkspace/contents.xcworkspacedata
|
222
|
-
- example/app/CakeMania/CakeMania.xcodeproj/project.xcworkspace/xcuserdata/maxim.xcuserdatad/UserInterfaceState.xcuserstate
|
223
|
-
- example/app/CakeMania/CakeMania.xcodeproj/xcshareddata/xcschemes/CakeMania-AppStore.xcscheme
|
224
|
-
- example/app/CakeMania/CakeMania.xcodeproj/xcshareddata/xcschemes/CakeMania-Debug.xcscheme
|
225
|
-
- example/app/CakeMania/CakeMania.xcodeproj/xcshareddata/xcschemes/CakeMania-Production.xcscheme
|
226
|
-
- example/app/CakeMania/CakeMania.xcodeproj/xcshareddata/xcschemes/CakeMania-RC.xcscheme
|
227
|
-
- example/app/CakeMania/CakeMania.xcodeproj/xcshareddata/xcschemes/CakeMania-Staging.xcscheme
|
228
|
-
- example/app/CakeMania/CakeMania.xcodeproj/xcuserdata/maxim.xcuserdatad/xcschemes/CakeManiaTst.xcscheme
|
229
|
-
- example/app/CakeMania/CakeMania.xcodeproj/xcuserdata/maxim.xcuserdatad/xcschemes/CakeManiaUITst.xcscheme
|
230
|
-
- example/app/CakeMania/CakeMania.xcodeproj/xcuserdata/maxim.xcuserdatad/xcschemes/xcschememanagement.plist
|
231
|
-
- example/app/CakeMania/Cakefile
|
232
|
-
- example/app/CakeMania/Info/CakeMania.plist
|
233
|
-
- example/app/CakeMania/Info/CakeManiaTst.plist
|
234
|
-
- example/app/CakeMania/Info/CakeManiaUITst.plist
|
235
|
-
- example/app/CakeMania/Res/CakeMania-test.entitlements
|
236
|
-
- example/app/CakeMania/Res/CakeMania.entitlements
|
237
|
-
- example/app/CakeMania/Res/CakeMania.xcassets/AppIcon.appiconset/Contents.json
|
238
|
-
- example/app/CakeMania/Src/AppDelegate.swift
|
239
|
-
- example/app/CakeMania/Src/Base.lproj/LaunchScreen.storyboard
|
240
|
-
- example/app/CakeMania/Src/Base.lproj/Main.storyboard
|
241
|
-
- example/app/CakeMania/Src/ObjC/CakeMania-Bridging-Header.h
|
242
|
-
- example/app/CakeMania/Src/ObjC/Prefix.pch
|
243
|
-
- example/app/CakeMania/Src/ViewController.swift
|
244
|
-
- example/app/CakeMania/Tst/Main.swift
|
245
|
-
- example/app/CakeMania/UITst/Main.swift
|
246
|
-
- example/framework/Cakefile
|
247
216
|
- fastlane-plugin-xcake/Gemfile
|
248
217
|
- fastlane-plugin-xcake/LICENSE
|
249
218
|
- fastlane-plugin-xcake/README.md
|
@@ -253,9 +222,6 @@ files:
|
|
253
222
|
- fastlane-plugin-xcake/lib/fastlane/plugin/xcake/actions/xcake_action.rb
|
254
223
|
- fastlane-plugin-xcake/lib/fastlane/plugin/xcake/version.rb
|
255
224
|
- fastlane-plugin-xcake/spec/spec_helper.rb
|
256
|
-
- gemfiles/Gemfile.xcodeproj-1.3.x
|
257
|
-
- gemfiles/Gemfile.xcodeproj-1.4.x
|
258
|
-
- gemfiles/Gemfile.xcodeproj-edge
|
259
225
|
- hound.yml
|
260
226
|
- lib/xcake.rb
|
261
227
|
- lib/xcake/command.rb
|
data/docs/Cakefile.md
DELETED
@@ -1,509 +0,0 @@
|
|
1
|
-
# Cakefile Syntax Reference
|
2
|
-
|
3
|
-
The `Cakefile` contains a lightweight DSL which provides the instructions on how to generate
|
4
|
-
a project file. We adopt the convention over configuration and thus it can be very simple:
|
5
|
-
|
6
|
-
```ruby
|
7
|
-
application_for :ios, 8.0 do |target|
|
8
|
-
target.name = "MyApp"
|
9
|
-
end
|
10
|
-
```
|
11
|
-
|
12
|
-
and here is much more complicated one:
|
13
|
-
|
14
|
-
```ruby
|
15
|
-
debug_configuration :staging
|
16
|
-
debug_configuration :debug
|
17
|
-
release_configuration :release
|
18
|
-
|
19
|
-
application_for :ios, 8.0 do |target|
|
20
|
-
target.name = "test"
|
21
|
-
target.all_configurations.each { |c| c.supported_devices = :iphone_only }
|
22
|
-
|
23
|
-
unit_tests_for target
|
24
|
-
end
|
25
|
-
```
|
26
|
-
|
27
|
-
As you can see, it is super easy to read; The goal of Xcake is to keep everything
|
28
|
-
readable, efficient and concise.
|
29
|
-
|
30
|
-
## Project
|
31
|
-
|
32
|
-
A project is automatically created from a `Cakefile`. To customize a Project
|
33
|
-
you can easily access all of it's properties via the `project` method.
|
34
|
-
|
35
|
-
```ruby
|
36
|
-
project do |p|
|
37
|
-
p.project_name = "Project"
|
38
|
-
end
|
39
|
-
```
|
40
|
-
|
41
|
-
You can also directly set the properties without a block, like so:
|
42
|
-
|
43
|
-
```ruby
|
44
|
-
project.project_name = "Project"
|
45
|
-
```
|
46
|
-
|
47
|
-
###Properties
|
48
|
-
|
49
|
-
#### Project Name
|
50
|
-
|
51
|
-
Sets the filename for the project
|
52
|
-
|
53
|
-
```ruby
|
54
|
-
project.name = "Project"
|
55
|
-
```
|
56
|
-
|
57
|
-
#### Class Prefix
|
58
|
-
|
59
|
-
Sets the class prefix for the project
|
60
|
-
|
61
|
-
```ruby
|
62
|
-
project.class_prefix = "XC"
|
63
|
-
```
|
64
|
-
|
65
|
-
#### Organization
|
66
|
-
|
67
|
-
Sets the organization for the project.
|
68
|
-
|
69
|
-
```ruby
|
70
|
-
project.organization = "Xcake Productions"
|
71
|
-
```
|
72
|
-
|
73
|
-
## Targets
|
74
|
-
|
75
|
-
Targets are the way we make products such as Applications, Extensions, Libraries and Tests.
|
76
|
-
Xcake provides some easy ways to produce these types of targets but also
|
77
|
-
allows you to drop down a level if you need more power.
|
78
|
-
|
79
|
-
###Applications
|
80
|
-
|
81
|
-
A project can specify any application targets such as iOS or Mac Apps.
|
82
|
-
|
83
|
-
iOS App:
|
84
|
-
|
85
|
-
```ruby
|
86
|
-
application_for :ios, 8.0
|
87
|
-
```
|
88
|
-
|
89
|
-
Mac App:
|
90
|
-
|
91
|
-
```ruby
|
92
|
-
application_for :mac, 8.0
|
93
|
-
```
|
94
|
-
|
95
|
-
### Tests
|
96
|
-
|
97
|
-
We can also specify a testing targets for other targets as well:
|
98
|
-
|
99
|
-
```ruby
|
100
|
-
application_for :mac, 8.0 do |target|
|
101
|
-
unit_tests_for target
|
102
|
-
end
|
103
|
-
```
|
104
|
-
|
105
|
-
The above code will create a complementary unit tests target for the `target`. The unit tests target name will be default `<target.name>Tests`, so if your `target.name` is "MyFirstApp" then your unit tests target will be named "MyFirstAppTests", and Xcake will include any files that are placed under folder with the same name/path (if it exists).
|
106
|
-
|
107
|
-
If you want to manually control configuration of unit tests targets (and/or have multiple ones), then you should do like this:
|
108
|
-
|
109
|
-
```ruby
|
110
|
-
application_for :mac, 8.0 do |target|
|
111
|
-
|
112
|
-
unit_tests_for target do |test_target|
|
113
|
-
|
114
|
-
test_target.name = "MyAwesomeTests"
|
115
|
-
test_target.include_files = ["Tests/**/*.*"]
|
116
|
-
|
117
|
-
# configure any other target-related properties
|
118
|
-
# as you would do with application target
|
119
|
-
|
120
|
-
end
|
121
|
-
end
|
122
|
-
```
|
123
|
-
|
124
|
-
### UI Tests
|
125
|
-
|
126
|
-
To create UI tests target, you do everything the same as for unit tests, but instead of "unit_tests_for" use "ui_tests_for", like this:
|
127
|
-
|
128
|
-
```ruby
|
129
|
-
application_for :mac, 8.0 do |target|
|
130
|
-
|
131
|
-
ui_tests_for target do |test_target|
|
132
|
-
|
133
|
-
test_target.name = "MyAwesomeUITests"
|
134
|
-
test_target.include_files = ["UITests/**/*.*"]
|
135
|
-
|
136
|
-
# configure any other target-related properties
|
137
|
-
# as you would do with application target
|
138
|
-
|
139
|
-
end
|
140
|
-
end
|
141
|
-
```
|
142
|
-
|
143
|
-
### Watch
|
144
|
-
|
145
|
-
To create watch applications we can simply use the `watch_app_for` method:
|
146
|
-
|
147
|
-
```ruby
|
148
|
-
application_for :mac, 8.0 do |target|
|
149
|
-
watch_app_for target, 2.0
|
150
|
-
end
|
151
|
-
```
|
152
|
-
|
153
|
-
###Custom Targets
|
154
|
-
|
155
|
-
If these aren't enough for you then you can specify a target
|
156
|
-
and manually set up it's properties.
|
157
|
-
|
158
|
-
```ruby
|
159
|
-
target do |target|
|
160
|
-
target.name = "Target"
|
161
|
-
end
|
162
|
-
```
|
163
|
-
|
164
|
-
###Properties
|
165
|
-
|
166
|
-
#### Name
|
167
|
-
|
168
|
-
Sets the name of the target
|
169
|
-
|
170
|
-
```ruby
|
171
|
-
target.name = "Target"
|
172
|
-
```
|
173
|
-
|
174
|
-
#### Type
|
175
|
-
|
176
|
-
Sets the type of the target, Can be `:application`, `:dynamic_library`,
|
177
|
-
`:framework` or `:static_library`.
|
178
|
-
|
179
|
-
```ruby
|
180
|
-
target.type = :application
|
181
|
-
```
|
182
|
-
|
183
|
-
#### Platform
|
184
|
-
|
185
|
-
Sets the platform of the target. Can be `:ios`, `:osx`, `:tvos` or `:watchos`
|
186
|
-
|
187
|
-
```ruby
|
188
|
-
target.platform = :ios
|
189
|
-
```
|
190
|
-
|
191
|
-
#### Deployment Target
|
192
|
-
|
193
|
-
Sets the deployment target for the platform.
|
194
|
-
|
195
|
-
```ruby
|
196
|
-
target.deployment_target = 8.0
|
197
|
-
```
|
198
|
-
|
199
|
-
#### Language
|
200
|
-
|
201
|
-
Sets the primary language of the target, can be `:objc` or `:swift`.
|
202
|
-
|
203
|
-
```ruby
|
204
|
-
target.language = :swift
|
205
|
-
```
|
206
|
-
|
207
|
-
#### Include Files
|
208
|
-
|
209
|
-
Sets the files to be included for a target, files and groups will be added
|
210
|
-
to the project to match the file system.
|
211
|
-
|
212
|
-
Xcake implicity figures out which build phase to add the files to, meaning
|
213
|
-
source code will be compiled and libraries linked.
|
214
|
-
|
215
|
-
[See Here](https://guides.cocoapods.org/syntax/podspec.html#group_file_patterns)
|
216
|
-
for file patterns
|
217
|
-
|
218
|
-
```ruby
|
219
|
-
target.include_files = ["FolderOne/*.*"] # array
|
220
|
-
target.include_files << "FolderTwo/**/*.*" # add an item to array
|
221
|
-
```
|
222
|
-
|
223
|
-
#### Exclude Files
|
224
|
-
|
225
|
-
Sets the files to be excluded for a target, if no target uses these files they
|
226
|
-
will be excluded from the project
|
227
|
-
|
228
|
-
[See Here](https://guides.cocoapods.org/syntax/podspec.html#group_file_patterns)
|
229
|
-
for file patterns
|
230
|
-
|
231
|
-
```ruby
|
232
|
-
target.exclude_files = ["FolderToIgnore/*.*"] # array
|
233
|
-
target.exclude_files << "OtherFolderToIgnore/*.*" # add an item to array
|
234
|
-
```
|
235
|
-
|
236
|
-
#### Linked Targets
|
237
|
-
|
238
|
-
If you have another library or framework based target in the project you wish to use
|
239
|
-
from another target (i.e in your application), you can indicate to xcake that you wish
|
240
|
-
to link them using Linked Targets.
|
241
|
-
|
242
|
-
Xcake will make sue that the library is built and then linked to the target you wish to
|
243
|
-
use it from.
|
244
|
-
|
245
|
-
```
|
246
|
-
target.linked_targets = [linked_target] # array
|
247
|
-
```
|
248
|
-
|
249
|
-
Here is a more illustrative example of how to link a library in the project so that it
|
250
|
-
can be used from an application.
|
251
|
-
|
252
|
-
```ruby
|
253
|
-
|
254
|
-
libraryTarget = target do |library_target|
|
255
|
-
# ...configuration here
|
256
|
-
end
|
257
|
-
|
258
|
-
application_for :ios, 10.0 do |application_target|
|
259
|
-
application_target.linked_targets = [libraryTarget] # array
|
260
|
-
end
|
261
|
-
```
|
262
|
-
|
263
|
-
#### Build Phases
|
264
|
-
|
265
|
-
Xcake already implcitly creates build phases for you depending on how you configure your target
|
266
|
-
however you can explicity create additional build phases depending on your needs.
|
267
|
-
|
268
|
-
##### Copy Headers Build Phase
|
269
|
-
|
270
|
-
You can create a Copy Headers build phase to expose headers for instance for a library.
|
271
|
-
|
272
|
-
```ruby
|
273
|
-
target.headers_build_phase "Build Phase Name" do |phase|
|
274
|
-
|
275
|
-
## Public Headers
|
276
|
-
phase.public = ["PublicHeader.h"] # array
|
277
|
-
phase.public << "OtherPublicHeader.h" # add an item to array
|
278
|
-
|
279
|
-
## Private Headers
|
280
|
-
phase.private = ["PrivateHeader.h"] # array
|
281
|
-
phase.private << "OtherPrivateHeader.h" # add an item to array
|
282
|
-
|
283
|
-
## Project Only Header
|
284
|
-
phase.project = ["ProjectHeader.h"] # array
|
285
|
-
phase.project << "OtherProjectHeader.h" # add an item to array
|
286
|
-
end
|
287
|
-
```
|
288
|
-
|
289
|
-
##### Shell Script Build Phase
|
290
|
-
|
291
|
-
You can create a Shell Script buld phase to run a script when building.
|
292
|
-
|
293
|
-
```ruby
|
294
|
-
target.shell_script_build_phase "Build Phase Name", <<-SCRIPT
|
295
|
-
echo "Hello World"
|
296
|
-
SCRIPT
|
297
|
-
end
|
298
|
-
```
|
299
|
-
|
300
|
-
## Configurations
|
301
|
-
|
302
|
-
Xcake allows you define a hierarchy of build configuations like you would in Xcode
|
303
|
-
for the Project and the Targets.
|
304
|
-
|
305
|
-
### Debug Configurations
|
306
|
-
|
307
|
-
For configurations used for internal testing we create a debug configuration,
|
308
|
-
this comes with sensible defaults optimized for debugging (i.e Assertions enabled).
|
309
|
-
|
310
|
-
```ruby
|
311
|
-
debug_configuration :staging
|
312
|
-
```
|
313
|
-
|
314
|
-
We can modify settings for each configuration easily.
|
315
|
-
|
316
|
-
```ruby
|
317
|
-
debug_configuration :staging do |configuration|
|
318
|
-
configuration.settings["KEY"] = "VALUE"
|
319
|
-
end
|
320
|
-
```
|
321
|
-
|
322
|
-
### Release Configurations
|
323
|
-
|
324
|
-
For configurations used for release we create a release configuration,
|
325
|
-
this comes with sensible defaults optimized for releasing (i.e Compiler optimizations enabled).
|
326
|
-
|
327
|
-
```ruby
|
328
|
-
release_configuration :release
|
329
|
-
```
|
330
|
-
|
331
|
-
We can modify settings for each configuration easily.
|
332
|
-
|
333
|
-
```ruby
|
334
|
-
release_configuration :release do |configuration|
|
335
|
-
configuration.settings["KEY"] = "VALUE"
|
336
|
-
end
|
337
|
-
```
|
338
|
-
|
339
|
-
### All Configurations
|
340
|
-
|
341
|
-
We can apply a particular shared setting across all of our configurations.
|
342
|
-
Xcake provides a simply way of doing this via an "all" configuration.
|
343
|
-
|
344
|
-
This will return an array of all of the currently declared configurations.
|
345
|
-
|
346
|
-
```ruby
|
347
|
-
all_configurations.each { |c| c.supported_devices = :iphone_only }
|
348
|
-
```
|
349
|
-
|
350
|
-
### Targets
|
351
|
-
|
352
|
-
To modify settings for certain target, then its as simple as prefixing the
|
353
|
-
target we want to modify the configuration for.
|
354
|
-
|
355
|
-
```ruby
|
356
|
-
|
357
|
-
target.all_configurations.each { |c| c.supported_devices = :iphone_only }
|
358
|
-
|
359
|
-
debug_configuration :staging do |configuration|
|
360
|
-
configuration.settings["KEY"] = "VALUE"
|
361
|
-
end
|
362
|
-
|
363
|
-
target.release_configuration :release do |configuration|
|
364
|
-
configuration.settings["KEY"] = "VALUE"
|
365
|
-
end
|
366
|
-
```
|
367
|
-
|
368
|
-
### Configuration Hiearchy
|
369
|
-
|
370
|
-
Xcake allows you to manage the configurations for the project and the target but
|
371
|
-
it also has its own hiearchy of settings, which are in the following order
|
372
|
-
(One at the top of the list are overwritten by ones at the bottom):
|
373
|
-
|
374
|
-
- Default Settings
|
375
|
-
These are the sensible defaults xcake provides for the configuration.
|
376
|
-
|
377
|
-
- Custom Settings
|
378
|
-
These are the settings set directly on the configuration.
|
379
|
-
|
380
|
-
### Properties
|
381
|
-
|
382
|
-
#### Name
|
383
|
-
|
384
|
-
Sets the name of the configuration
|
385
|
-
|
386
|
-
```ruby
|
387
|
-
configuration.name = "Release"
|
388
|
-
```
|
389
|
-
|
390
|
-
#### Configuration File
|
391
|
-
|
392
|
-
Sets the path to a XCConfig file to inherit build settings from.
|
393
|
-
|
394
|
-
```ruby
|
395
|
-
configuration.configuration_file = "Files/Settings.xcconfig"
|
396
|
-
```
|
397
|
-
|
398
|
-
#### Build Settings
|
399
|
-
|
400
|
-
A hash of all the build settings for a configuration
|
401
|
-
|
402
|
-
```ruby
|
403
|
-
configuration.settings["ENABLE_BITCODE"] = false
|
404
|
-
```
|
405
|
-
|
406
|
-
### Build Settings Shortcuts
|
407
|
-
|
408
|
-
Xcake also provides some shortcuts for some common build settings.
|
409
|
-
|
410
|
-
#### Supported Devices
|
411
|
-
|
412
|
-
Allows you specify the devices an iOS App can run on, can be `:iphone_only`,
|
413
|
-
`:ipad_only` or `:universal`
|
414
|
-
|
415
|
-
```ruby
|
416
|
-
configuration.supported_devices = :iphone_only
|
417
|
-
```
|
418
|
-
|
419
|
-
#### Product Bundle Identifier
|
420
|
-
|
421
|
-
Allows you specify the product bundle identifier.
|
422
|
-
|
423
|
-
```ruby
|
424
|
-
configuration.product_bundle_identifier = "com.test.app"
|
425
|
-
```
|
426
|
-
|
427
|
-
#### Preprocessor Definitions
|
428
|
-
|
429
|
-
Allows you to specify preprocessor definitions.
|
430
|
-
|
431
|
-
```ruby
|
432
|
-
configuration.preprocessor_definitions["NAME"] = "VALUE"
|
433
|
-
```
|
434
|
-
## Schemes
|
435
|
-
|
436
|
-
Xcake allows you to specify schemes for launching, testing,
|
437
|
-
profiling and archiving targets.
|
438
|
-
|
439
|
-
When no schemes are specified for a target then Xcake will auto generate
|
440
|
-
a scheme per configuration per target (i.e "Target-Debug" and "Target-Release")
|
441
|
-
|
442
|
-
### Creating A Scheme
|
443
|
-
|
444
|
-
We can create a scheme with the name of the target like so:
|
445
|
-
|
446
|
-
```ruby
|
447
|
-
target.scheme(target.name)
|
448
|
-
```
|
449
|
-
|
450
|
-
If we don't configure this scheme then it will default to the reccomended
|
451
|
-
Apple settings of using the debug build configurations for everything
|
452
|
-
except the Archive action which will use the Release configuration.
|
453
|
-
|
454
|
-
We can modify settings for a scheme easily.
|
455
|
-
|
456
|
-
```ruby
|
457
|
-
target.scheme(target.name) do |scheme|
|
458
|
-
scheme.build_configuration = :staging
|
459
|
-
end
|
460
|
-
```
|
461
|
-
### Properties
|
462
|
-
|
463
|
-
#### Name
|
464
|
-
|
465
|
-
Sets the name of the scheme
|
466
|
-
|
467
|
-
```ruby
|
468
|
-
scheme.name = "MyApp"
|
469
|
-
```
|
470
|
-
|
471
|
-
#### Test Configuration
|
472
|
-
|
473
|
-
Sets the configuration to use when running tests
|
474
|
-
|
475
|
-
```ruby
|
476
|
-
scheme.test_configuration = :debug
|
477
|
-
```
|
478
|
-
|
479
|
-
#### Launch Configuration
|
480
|
-
|
481
|
-
Sets the configuration to use when running tests
|
482
|
-
|
483
|
-
```ruby
|
484
|
-
scheme.launch_configuration = :debug
|
485
|
-
```
|
486
|
-
|
487
|
-
#### Profile Configuration
|
488
|
-
|
489
|
-
Sets the configuration to use when profiling a target
|
490
|
-
|
491
|
-
```ruby
|
492
|
-
scheme.profile_configuration = :debug
|
493
|
-
```
|
494
|
-
|
495
|
-
#### Analyze Configuration
|
496
|
-
|
497
|
-
Sets the configuration to use when analyzing a target
|
498
|
-
|
499
|
-
```ruby
|
500
|
-
scheme.analyze_configuration = :debug
|
501
|
-
```
|
502
|
-
|
503
|
-
#### Archive Configuration
|
504
|
-
|
505
|
-
Sets the configuration to use when archiving
|
506
|
-
|
507
|
-
```ruby
|
508
|
-
scheme.archive_configuration = :debug
|
509
|
-
```
|