xcodeproj 1.17.1 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/xcodeproj/command/sort.rb +12 -1
- data/lib/xcodeproj/config.rb +12 -2
- data/lib/xcodeproj/config/other_linker_flags_parser.rb +5 -0
- data/lib/xcodeproj/constants.rb +61 -49
- data/lib/xcodeproj/gem_version.rb +1 -1
- data/lib/xcodeproj/project.rb +9 -6
- data/lib/xcodeproj/project/object/build_file.rb +7 -1
- data/lib/xcodeproj/project/object/build_phase.rb +31 -0
- data/lib/xcodeproj/project/object/group.rb +11 -9
- data/lib/xcodeproj/project/object/helpers/file_references_factory.rb +6 -6
- data/lib/xcodeproj/project/object/helpers/groupable_helper.rb +1 -1
- data/lib/xcodeproj/project/object/native_target.rb +43 -0
- data/lib/xcodeproj/project/object/swift_package_product_dependency.rb +10 -0
- data/lib/xcodeproj/project/object/swift_package_remote_reference.rb +14 -0
- data/lib/xcodeproj/project/project_helper.rb +6 -6
- data/lib/xcodeproj/scheme.rb +5 -1
- data/lib/xcodeproj/scheme/abstract_scheme_action.rb +72 -0
- data/lib/xcodeproj/scheme/build_action.rb +87 -1
- data/lib/xcodeproj/scheme/execution_action.rb +86 -0
- data/lib/xcodeproj/scheme/launch_action.rb +17 -2
- data/lib/xcodeproj/scheme/location_scenario_reference.rb +49 -0
- data/lib/xcodeproj/scheme/profile_action.rb +5 -5
- data/lib/xcodeproj/scheme/send_email_action_content.rb +84 -0
- data/lib/xcodeproj/scheme/shell_script_action_content.rb +77 -0
- data/lib/xcodeproj/scheme/test_action.rb +7 -3
- metadata +24 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bab98461310ae1a7572bae0b8dd9025cdf12ee53a64c7d457e8d4982d71982d
|
4
|
+
data.tar.gz: 59d1ddc2130ee7f88eb646a1c98dbf14e45da612448a12425df004d416f93961
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e2431ba9cbf960b7e1ef53ff3dae65565b51fbba1cbb0c6a096d29251ca49c751403575c46fdae6252e176b8ada16ac5aa659d6b015f142eb338e21718a7a38
|
7
|
+
data.tar.gz: dfe1895012ba35e32dd44b15b4b2cb5e8ab2957eb7919f39a514c7675b8a261a4f4688006ace24e6eae0dcfc07be70392cf047f0cb66bd8f1036bc3fe817f366
|
data/README.md
CHANGED
@@ -10,7 +10,7 @@ support for Xcode workspaces (`.xcworkspace`), configuration files (`.xcconfig`)
|
|
10
10
|
Xcode Scheme files (`.xcscheme`).
|
11
11
|
|
12
12
|
It is used in [CocoaPods](https://github.com/CocoaPods/CocoaPods) to create a
|
13
|
-
|
13
|
+
collection of supplemental libraries or frameworks, for all platforms Xcode supports.
|
14
14
|
|
15
15
|
The API reference can be found [here](http://www.rubydoc.info/gems/xcodeproj).
|
16
16
|
|
@@ -9,22 +9,33 @@ module Xcodeproj
|
|
9
9
|
|
10
10
|
self.summary = 'Sorts the given project.'
|
11
11
|
|
12
|
+
def self.options
|
13
|
+
[
|
14
|
+
['--group-option=[above|below]', 'The position of the groups when sorting. If no option is specified, sorting will interleave groups and files.'],
|
15
|
+
].concat(super)
|
16
|
+
end
|
17
|
+
|
12
18
|
self.arguments = [
|
13
19
|
CLAide::Argument.new('PROJECT', false),
|
14
20
|
]
|
15
21
|
|
16
22
|
def initialize(argv)
|
17
23
|
self.xcodeproj_path = argv.shift_argument
|
24
|
+
@group_option = argv.option('group-option')
|
25
|
+
@group_option &&= @group_option.to_sym
|
18
26
|
super
|
19
27
|
end
|
20
28
|
|
21
29
|
def validate!
|
22
30
|
super
|
31
|
+
unless [nil, :above, :below].include?(@group_option)
|
32
|
+
help! "Unknown format `#{@group_option}`"
|
33
|
+
end
|
23
34
|
open_project!
|
24
35
|
end
|
25
36
|
|
26
37
|
def run
|
27
|
-
xcodeproj.sort
|
38
|
+
xcodeproj.sort(:groups_position => @group_option)
|
28
39
|
xcodeproj.save
|
29
40
|
puts "The `#{File.basename(xcodeproj_path)}` project was sorted"
|
30
41
|
end
|
data/lib/xcodeproj/config.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'shellwords'
|
2
3
|
require 'xcodeproj/config/other_linker_flags_parser'
|
3
4
|
|
@@ -58,7 +59,7 @@ module Xcodeproj
|
|
58
59
|
@attributes = {}
|
59
60
|
@includes = []
|
60
61
|
@other_linker_flags = {}
|
61
|
-
[:simple, :frameworks, :weak_frameworks, :libraries, :force_load].each do |key|
|
62
|
+
[:simple, :frameworks, :weak_frameworks, :libraries, :arg_files, :force_load].each do |key|
|
62
63
|
@other_linker_flags[key] = Set.new
|
63
64
|
end
|
64
65
|
merge!(extract_hash(xcconfig_hash_or_file))
|
@@ -125,9 +126,10 @@ module Xcodeproj
|
|
125
126
|
:frameworks => '-framework ',
|
126
127
|
:weak_frameworks => '-weak_framework ',
|
127
128
|
:libraries => '-l',
|
129
|
+
:arg_files => '@',
|
128
130
|
:force_load => '-force_load',
|
129
131
|
}
|
130
|
-
[:libraries, :frameworks, :weak_frameworks, :force_load].each do |key|
|
132
|
+
[:libraries, :frameworks, :weak_frameworks, :arg_files, :force_load].each do |key|
|
131
133
|
modifier = modifiers[key]
|
132
134
|
sorted = other_linker_flags[key].to_a.sort
|
133
135
|
if key == :force_load
|
@@ -180,6 +182,13 @@ module Xcodeproj
|
|
180
182
|
other_linker_flags[:libraries]
|
181
183
|
end
|
182
184
|
|
185
|
+
# @return [Set<String>] The list of the arg files required by this
|
186
|
+
# settings file.
|
187
|
+
#
|
188
|
+
def arg_files
|
189
|
+
other_linker_flags[:arg_files]
|
190
|
+
end
|
191
|
+
|
183
192
|
public
|
184
193
|
|
185
194
|
# @!group Merging
|
@@ -254,6 +263,7 @@ module Xcodeproj
|
|
254
263
|
# @return [Hash]
|
255
264
|
#
|
256
265
|
def extract_hash(argument)
|
266
|
+
return argument if argument.is_a?(Hash)
|
257
267
|
if argument.respond_to? :read
|
258
268
|
@filepath = Pathname.new(argument.to_path)
|
259
269
|
hash_from_file_content(argument.read)
|
@@ -16,6 +16,7 @@ module Xcodeproj
|
|
16
16
|
:frameworks => [],
|
17
17
|
:weak_frameworks => [],
|
18
18
|
:libraries => [],
|
19
|
+
:arg_files => [],
|
19
20
|
:simple => [],
|
20
21
|
:force_load => [],
|
21
22
|
}
|
@@ -32,6 +33,8 @@ module Xcodeproj
|
|
32
33
|
key = :weak_frameworks
|
33
34
|
when '-l'
|
34
35
|
key = :libraries
|
36
|
+
when '@'
|
37
|
+
key = :arg_files
|
35
38
|
when '-force_load'
|
36
39
|
key = :force_load
|
37
40
|
else
|
@@ -58,6 +61,8 @@ module Xcodeproj
|
|
58
61
|
flags.strip.shellsplit.flat_map do |string|
|
59
62
|
if string =~ /\A-l.+/
|
60
63
|
['-l', string[2..-1]]
|
64
|
+
elsif string =~ /\A@.+/
|
65
|
+
['@', string[1..-1]]
|
61
66
|
else
|
62
67
|
string
|
63
68
|
end
|
data/lib/xcodeproj/constants.rb
CHANGED
@@ -4,19 +4,19 @@ module Xcodeproj
|
|
4
4
|
module Constants
|
5
5
|
# @return [String] The last known iOS SDK (stable).
|
6
6
|
#
|
7
|
-
LAST_KNOWN_IOS_SDK = '
|
7
|
+
LAST_KNOWN_IOS_SDK = '14.0'
|
8
8
|
|
9
9
|
# @return [String] The last known OS X SDK (stable).
|
10
10
|
#
|
11
|
-
LAST_KNOWN_OSX_SDK = '10.
|
11
|
+
LAST_KNOWN_OSX_SDK = '10.15'
|
12
12
|
|
13
13
|
# @return [String] The last known tvOS SDK (stable).
|
14
14
|
#
|
15
|
-
LAST_KNOWN_TVOS_SDK = '
|
15
|
+
LAST_KNOWN_TVOS_SDK = '14.0'
|
16
16
|
|
17
17
|
# @return [String] The last known watchOS SDK (stable).
|
18
18
|
#
|
19
|
-
LAST_KNOWN_WATCHOS_SDK = '
|
19
|
+
LAST_KNOWN_WATCHOS_SDK = '7.0'
|
20
20
|
|
21
21
|
# @return [String] The last known archive version to Xcodeproj.
|
22
22
|
#
|
@@ -32,15 +32,15 @@ module Xcodeproj
|
|
32
32
|
|
33
33
|
# @return [String] The last known object version to Xcodeproj.
|
34
34
|
#
|
35
|
-
LAST_KNOWN_OBJECT_VERSION =
|
35
|
+
LAST_KNOWN_OBJECT_VERSION = 55
|
36
36
|
|
37
|
-
# @return [String] The last known
|
37
|
+
# @return [String] The last known Xcode version to Xcodeproj.
|
38
38
|
#
|
39
|
-
LAST_UPGRADE_CHECK = '
|
39
|
+
LAST_UPGRADE_CHECK = '1240'
|
40
40
|
|
41
|
-
# @return [String] The last known
|
41
|
+
# @return [String] The last known Xcode version to Xcodeproj.
|
42
42
|
#
|
43
|
-
LAST_SWIFT_UPGRADE_CHECK = '
|
43
|
+
LAST_SWIFT_UPGRADE_CHECK = '1240'
|
44
44
|
|
45
45
|
# @return [String] The version of `.xcscheme` files supported by Xcodeproj
|
46
46
|
#
|
@@ -93,12 +93,14 @@ module Xcodeproj
|
|
93
93
|
'app' => 'wrapper.application',
|
94
94
|
'appex' => 'wrapper.app-extension',
|
95
95
|
'bundle' => 'wrapper.plug-in',
|
96
|
+
'cpp' => 'sourcecode.cpp.cpp',
|
96
97
|
'dylib' => 'compiled.mach-o.dylib',
|
97
98
|
'entitlements' => 'text.plist.entitlements',
|
98
99
|
'framework' => 'wrapper.framework',
|
99
100
|
'gif' => 'image.gif',
|
100
101
|
'gpx' => 'text.xml',
|
101
102
|
'h' => 'sourcecode.c.h',
|
103
|
+
'hpp' => 'sourcecode.cpp.h',
|
102
104
|
'm' => 'sourcecode.c.objc',
|
103
105
|
'markdown' => 'text',
|
104
106
|
'mdimporter' => 'wrapper.cfbundle',
|
@@ -126,6 +128,7 @@ module Xcodeproj
|
|
126
128
|
# @return [Hash] The compatibility version string for different object versions.
|
127
129
|
#
|
128
130
|
COMPATIBILITY_VERSION_BY_OBJECT_VERSION = {
|
131
|
+
55 => 'Xcode 13.0',
|
129
132
|
54 => 'Xcode 12.0',
|
130
133
|
53 => 'Xcode 11.4',
|
131
134
|
52 => 'Xcode 11.0',
|
@@ -140,46 +143,48 @@ module Xcodeproj
|
|
140
143
|
# @return [Hash] The uniform type identifier of various product types.
|
141
144
|
#
|
142
145
|
PRODUCT_TYPE_UTI = {
|
143
|
-
:application
|
144
|
-
:
|
145
|
-
:
|
146
|
-
:
|
147
|
-
:
|
148
|
-
:
|
149
|
-
:
|
150
|
-
:
|
151
|
-
:
|
152
|
-
:
|
153
|
-
:
|
154
|
-
:
|
155
|
-
:
|
156
|
-
:
|
157
|
-
:
|
158
|
-
:
|
159
|
-
:
|
160
|
-
:
|
161
|
-
:
|
162
|
-
:
|
146
|
+
:application => 'com.apple.product-type.application',
|
147
|
+
:application_on_demand_install_capable => 'com.apple.product-type.application.on-demand-install-capable',
|
148
|
+
:framework => 'com.apple.product-type.framework',
|
149
|
+
:dynamic_library => 'com.apple.product-type.library.dynamic',
|
150
|
+
:static_library => 'com.apple.product-type.library.static',
|
151
|
+
:bundle => 'com.apple.product-type.bundle',
|
152
|
+
:octest_bundle => 'com.apple.product-type.bundle',
|
153
|
+
:unit_test_bundle => 'com.apple.product-type.bundle.unit-test',
|
154
|
+
:ui_test_bundle => 'com.apple.product-type.bundle.ui-testing',
|
155
|
+
:app_extension => 'com.apple.product-type.app-extension',
|
156
|
+
:command_line_tool => 'com.apple.product-type.tool',
|
157
|
+
:watch_app => 'com.apple.product-type.application.watchapp',
|
158
|
+
:watch2_app => 'com.apple.product-type.application.watchapp2',
|
159
|
+
:watch2_app_container => 'com.apple.product-type.application.watchapp2-container',
|
160
|
+
:watch_extension => 'com.apple.product-type.watchkit-extension',
|
161
|
+
:watch2_extension => 'com.apple.product-type.watchkit2-extension',
|
162
|
+
:tv_extension => 'com.apple.product-type.tv-app-extension',
|
163
|
+
:messages_application => 'com.apple.product-type.application.messages',
|
164
|
+
:messages_extension => 'com.apple.product-type.app-extension.messages',
|
165
|
+
:sticker_pack => 'com.apple.product-type.app-extension.messages-sticker-pack',
|
166
|
+
:xpc_service => 'com.apple.product-type.xpc-service',
|
163
167
|
}.freeze
|
164
168
|
|
165
169
|
# @return [Hash] The extensions or the various product UTIs.
|
166
170
|
#
|
167
171
|
PRODUCT_UTI_EXTENSIONS = {
|
168
|
-
:application
|
169
|
-
:
|
170
|
-
:
|
171
|
-
:
|
172
|
-
:
|
173
|
-
:
|
174
|
-
:
|
175
|
-
:
|
176
|
-
:
|
177
|
-
:
|
178
|
-
:
|
179
|
-
:
|
180
|
-
:
|
181
|
-
:
|
182
|
-
:
|
172
|
+
:application => 'app',
|
173
|
+
:application_on_demand_install_capable => 'app',
|
174
|
+
:framework => 'framework',
|
175
|
+
:dynamic_library => 'dylib',
|
176
|
+
:static_library => 'a',
|
177
|
+
:bundle => 'bundle',
|
178
|
+
:octest_bundle => 'octest',
|
179
|
+
:unit_test_bundle => 'xctest',
|
180
|
+
:ui_test_bundle => 'xctest',
|
181
|
+
:app_extension => 'appex',
|
182
|
+
:messages_application => 'app',
|
183
|
+
:messages_extension => 'appex',
|
184
|
+
:sticker_pack => 'appex',
|
185
|
+
:watch2_extension => 'appex',
|
186
|
+
:watch2_app => 'app',
|
187
|
+
:watch2_app_container => 'app',
|
183
188
|
}.freeze
|
184
189
|
|
185
190
|
# @return [Hash] The common build settings grouped by platform, and build
|
@@ -200,11 +205,9 @@ module Xcodeproj
|
|
200
205
|
}.freeze,
|
201
206
|
[:ios] => {
|
202
207
|
'SDKROOT' => 'iphoneos',
|
203
|
-
'CODE_SIGN_IDENTITY' => 'iPhone Developer',
|
204
208
|
}.freeze,
|
205
209
|
[:osx] => {
|
206
210
|
'SDKROOT' => 'macosx',
|
207
|
-
'CODE_SIGN_IDENTITY' => '-',
|
208
211
|
}.freeze,
|
209
212
|
[:tvos] => {
|
210
213
|
'SDKROOT' => 'appletvos',
|
@@ -253,7 +256,6 @@ module Xcodeproj
|
|
253
256
|
[:debug, :static_library, :swift] => {
|
254
257
|
}.freeze,
|
255
258
|
[:framework] => {
|
256
|
-
'CODE_SIGN_IDENTITY' => '',
|
257
259
|
'CURRENT_PROJECT_VERSION' => '1',
|
258
260
|
'DEFINES_MODULE' => 'YES',
|
259
261
|
'DYLIB_COMPATIBILITY_VERSION' => '1',
|
@@ -271,7 +273,6 @@ module Xcodeproj
|
|
271
273
|
}.freeze,
|
272
274
|
[:osx, :framework] => {
|
273
275
|
'COMBINE_HIDPI_IMAGES' => 'YES',
|
274
|
-
'FRAMEWORK_VERSION' => 'A',
|
275
276
|
'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) @executable_path/../Frameworks @loader_path/Frameworks',
|
276
277
|
}.freeze,
|
277
278
|
[:watchos, :framework] => {
|
@@ -313,6 +314,7 @@ module Xcodeproj
|
|
313
314
|
}.freeze,
|
314
315
|
[:application] => {
|
315
316
|
'ASSETCATALOG_COMPILER_APPICON_NAME' => 'AppIcon',
|
317
|
+
'ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME' => 'AccentColor',
|
316
318
|
}.freeze,
|
317
319
|
[:ios, :application] => {
|
318
320
|
'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) @executable_path/Frameworks',
|
@@ -328,10 +330,12 @@ module Xcodeproj
|
|
328
330
|
}.freeze,
|
329
331
|
[:tvos, :application] => {
|
330
332
|
'ASSETCATALOG_COMPILER_APPICON_NAME' => 'App Icon & Top Shelf Image',
|
331
|
-
'ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME' => 'LaunchImage',
|
332
333
|
'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) @executable_path/Frameworks',
|
333
334
|
'TARGETED_DEVICE_FAMILY' => '3',
|
334
335
|
}.freeze,
|
336
|
+
[:tvos, :application, :swift] => {
|
337
|
+
'ENABLE_PREVIEWS' => 'YES',
|
338
|
+
}.freeze,
|
335
339
|
[:watchos, :application, :swift] => {
|
336
340
|
'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' => 'YES',
|
337
341
|
}.freeze,
|
@@ -377,6 +381,7 @@ module Xcodeproj
|
|
377
381
|
'CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF' => 'YES',
|
378
382
|
'CLANG_WARN_OBJC_LITERAL_CONVERSION' => 'YES',
|
379
383
|
'CLANG_WARN_OBJC_ROOT_CLASS' => 'YES_ERROR',
|
384
|
+
'CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER' => 'YES',
|
380
385
|
'CLANG_WARN_RANGE_LOOP_ANALYSIS' => 'YES',
|
381
386
|
'CLANG_WARN_STRICT_PROTOTYPES' => 'YES',
|
382
387
|
'CLANG_WARN_SUSPICIOUS_MOVE' => 'YES',
|
@@ -449,5 +454,12 @@ module Xcodeproj
|
|
449
454
|
$(inherited)
|
450
455
|
${inherited}
|
451
456
|
).freeze
|
457
|
+
|
458
|
+
# @return [Hash] Possible types for a scheme's 'ExecutionAction' node
|
459
|
+
#
|
460
|
+
EXECUTION_ACTION_TYPE = {
|
461
|
+
:shell_script => 'Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction',
|
462
|
+
:send_email => 'Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.SendEmailAction',
|
463
|
+
}.freeze
|
452
464
|
end
|
453
465
|
end
|
data/lib/xcodeproj/project.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'atomos'
|
2
3
|
require 'fileutils'
|
3
4
|
require 'securerandom'
|
@@ -220,11 +221,11 @@ module Xcodeproj
|
|
220
221
|
end
|
221
222
|
|
222
223
|
if archive_version.to_i > Constants::LAST_KNOWN_ARCHIVE_VERSION
|
223
|
-
raise
|
224
|
+
raise "[Xcodeproj] Unknown archive version (#{archive_version.to_i})."
|
224
225
|
end
|
225
226
|
|
226
227
|
if object_version.to_i > Constants::LAST_KNOWN_OBJECT_VERSION
|
227
|
-
raise
|
228
|
+
raise "[Xcodeproj] Unknown object version (#{object_version.to_i})."
|
228
229
|
end
|
229
230
|
|
230
231
|
# Projects can have product_ref_groups that are not listed in the main_groups["Products"]
|
@@ -711,9 +712,10 @@ module Xcodeproj
|
|
711
712
|
#
|
712
713
|
# @return [PBXNativeTarget] the target.
|
713
714
|
#
|
714
|
-
def new_target(type, name, platform, deployment_target = nil, product_group = nil, language = nil)
|
715
|
+
def new_target(type, name, platform, deployment_target = nil, product_group = nil, language = nil, product_basename = nil)
|
715
716
|
product_group ||= products_group
|
716
|
-
|
717
|
+
product_basename ||= name
|
718
|
+
ProjectHelper.new_target(self, type, name, platform, deployment_target, product_group, language, product_basename)
|
717
719
|
end
|
718
720
|
|
719
721
|
# Creates a new resource bundles target and adds it to the project.
|
@@ -731,9 +733,10 @@ module Xcodeproj
|
|
731
733
|
#
|
732
734
|
# @return [PBXNativeTarget] the target.
|
733
735
|
#
|
734
|
-
def new_resources_bundle(name, platform, product_group = nil)
|
736
|
+
def new_resources_bundle(name, platform, product_group = nil, product_basename = nil)
|
735
737
|
product_group ||= products_group
|
736
|
-
|
738
|
+
product_basename ||= name
|
739
|
+
ProjectHelper.new_resources_bundle(self, name, platform, product_group, product_basename)
|
737
740
|
end
|
738
741
|
|
739
742
|
# Creates a new target and adds it to the project.
|
@@ -39,6 +39,10 @@ module Xcodeproj
|
|
39
39
|
#
|
40
40
|
attribute :platform_filter, String
|
41
41
|
|
42
|
+
# @return [Array<String>] the platform filters for this build file.
|
43
|
+
#
|
44
|
+
attribute :platform_filters, Array
|
45
|
+
|
42
46
|
#---------------------------------------------------------------------#
|
43
47
|
|
44
48
|
public
|
@@ -49,7 +53,9 @@ module Xcodeproj
|
|
49
53
|
# user.
|
50
54
|
#
|
51
55
|
def display_name
|
52
|
-
if
|
56
|
+
if product_ref
|
57
|
+
product_ref.display_name
|
58
|
+
elsif file_ref
|
53
59
|
file_ref.display_name
|
54
60
|
else
|
55
61
|
super
|
@@ -30,6 +30,16 @@ module Xcodeproj
|
|
30
30
|
#
|
31
31
|
attribute :run_only_for_deployment_postprocessing, String, '0'
|
32
32
|
|
33
|
+
# @return [String] whether or not this run script will be forced to
|
34
|
+
# run even on incremental builds. Can be either '1', or
|
35
|
+
# missing. By default this option is disabled in Xcode.
|
36
|
+
#
|
37
|
+
# @note This setting is exposed in Xcode in the UI of
|
38
|
+
# PBXShellScriptBuildPhase as `Based on
|
39
|
+
# dependency analysis` (selected by default).
|
40
|
+
#
|
41
|
+
attribute :always_out_of_date, String
|
42
|
+
|
33
43
|
# @return [String] Comments associated with this build phase.
|
34
44
|
#
|
35
45
|
# @note This is apparently no longer used by Xcode.
|
@@ -135,6 +145,27 @@ module Xcodeproj
|
|
135
145
|
def ascii_plist_annotation
|
136
146
|
" #{display_name} "
|
137
147
|
end
|
148
|
+
|
149
|
+
# Sorts the build files of the phase according to the display
|
150
|
+
# name or the path.
|
151
|
+
#
|
152
|
+
# @param [Hash] _options
|
153
|
+
# Not used.
|
154
|
+
#
|
155
|
+
# @return [void]
|
156
|
+
#
|
157
|
+
def sort(_options = nil)
|
158
|
+
files.sort! do |x, y|
|
159
|
+
result = File.basename(x.display_name.downcase, '.*') <=> File.basename(y.display_name.downcase, '.*')
|
160
|
+
if result.zero?
|
161
|
+
result = File.extname(x.display_name.downcase) <=> File.extname(y.display_name.downcase)
|
162
|
+
if result.zero? && x.file_ref.respond_to?(:full_path) && y.file_ref.respond_to?(:full_path)
|
163
|
+
result = x.file_ref.full_path.to_s.downcase <=> y.file_ref.full_path.to_s.downcase
|
164
|
+
end
|
165
|
+
end
|
166
|
+
result
|
167
|
+
end
|
168
|
+
end
|
138
169
|
end
|
139
170
|
|
140
171
|
#-----------------------------------------------------------------------#
|