xcodeproj 1.15.0 → 1.19.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f67749b29dedd0818af4098881cb282662875d984f7d05c7bda0af4b0c86ec82
4
- data.tar.gz: '09e6e7cac5b75fa227f838431390860392378891e2f3fc8248fa7795e005d04a'
3
+ metadata.gz: 72f6eb6645b557dea09ae4be0fd400e48b0d4f1e42c31b7b61af87fd3c31a9cd
4
+ data.tar.gz: 0c0bcfa7abc28721f61f48e295198da53576e90d62161c50a6cc7333c1e94455
5
5
  SHA512:
6
- metadata.gz: e7317ac6d84cc9dc3b66d9dc73eb4ae5f9c585e60daed3255bfd209db017a34e1a44f25358e3a1ec7fe61f9c809f0ecb3c526b796b489f8e4e473ffe577e81b3
7
- data.tar.gz: 16fe549706c8e9c7806de7a1a739ffc0ea145762a0e70a6906884c2437bf8661bd2068f43e9095d208d0ebceda8a36a8c1a7ad39966bc84782490dc4e4720e36
6
+ metadata.gz: 4f856d8cbee5b9b7b6bcbe7acce4034e8277fd05ac7caf0d2c317f75d622bb5c518dd2ddee67dac1c6a7fb2773aebb5a5de2cf2232af3fffc2353323fd08623d
7
+ data.tar.gz: 9cf088a34dea380b56716f005c35fc601d9b193a0a4908556d4f8ccc80408ee328755ccb767dc0ed50adc0bc3e822cc9bcdcdeac405c97fc514f6dd429f746ac
@@ -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 = '12.2'
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.14'
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 = '12.2'
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 = '5.2'
19
+ LAST_KNOWN_WATCHOS_SDK = '7.0'
20
20
 
21
21
  # @return [String] The last known archive version to Xcodeproj.
22
22
  #
@@ -32,7 +32,7 @@ module Xcodeproj
32
32
 
33
33
  # @return [String] The last known object version to Xcodeproj.
34
34
  #
35
- LAST_KNOWN_OBJECT_VERSION = 52
35
+ LAST_KNOWN_OBJECT_VERSION = 54
36
36
 
37
37
  # @return [String] The last known object version to Xcodeproj.
38
38
  #
@@ -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,8 @@ module Xcodeproj
126
128
  # @return [Hash] The compatibility version string for different object versions.
127
129
  #
128
130
  COMPATIBILITY_VERSION_BY_OBJECT_VERSION = {
131
+ 54 => 'Xcode 12.0',
132
+ 53 => 'Xcode 11.4',
129
133
  52 => 'Xcode 11.0',
130
134
  51 => 'Xcode 10.0',
131
135
  50 => 'Xcode 9.3',
@@ -138,46 +142,48 @@ module Xcodeproj
138
142
  # @return [Hash] The uniform type identifier of various product types.
139
143
  #
140
144
  PRODUCT_TYPE_UTI = {
141
- :application => 'com.apple.product-type.application',
142
- :framework => 'com.apple.product-type.framework',
143
- :dynamic_library => 'com.apple.product-type.library.dynamic',
144
- :static_library => 'com.apple.product-type.library.static',
145
- :bundle => 'com.apple.product-type.bundle',
146
- :octest_bundle => 'com.apple.product-type.bundle',
147
- :unit_test_bundle => 'com.apple.product-type.bundle.unit-test',
148
- :ui_test_bundle => 'com.apple.product-type.bundle.ui-testing',
149
- :app_extension => 'com.apple.product-type.app-extension',
150
- :command_line_tool => 'com.apple.product-type.tool',
151
- :watch_app => 'com.apple.product-type.application.watchapp',
152
- :watch2_app => 'com.apple.product-type.application.watchapp2',
153
- :watch2_app_container => 'com.apple.product-type.application.watchapp2-container',
154
- :watch_extension => 'com.apple.product-type.watchkit-extension',
155
- :watch2_extension => 'com.apple.product-type.watchkit2-extension',
156
- :tv_extension => 'com.apple.product-type.tv-app-extension',
157
- :messages_application => 'com.apple.product-type.application.messages',
158
- :messages_extension => 'com.apple.product-type.app-extension.messages',
159
- :sticker_pack => 'com.apple.product-type.app-extension.messages-sticker-pack',
160
- :xpc_service => 'com.apple.product-type.xpc-service',
145
+ :application => 'com.apple.product-type.application',
146
+ :application_on_demand_install_capable => 'com.apple.product-type.application.on-demand-install-capable',
147
+ :framework => 'com.apple.product-type.framework',
148
+ :dynamic_library => 'com.apple.product-type.library.dynamic',
149
+ :static_library => 'com.apple.product-type.library.static',
150
+ :bundle => 'com.apple.product-type.bundle',
151
+ :octest_bundle => 'com.apple.product-type.bundle',
152
+ :unit_test_bundle => 'com.apple.product-type.bundle.unit-test',
153
+ :ui_test_bundle => 'com.apple.product-type.bundle.ui-testing',
154
+ :app_extension => 'com.apple.product-type.app-extension',
155
+ :command_line_tool => 'com.apple.product-type.tool',
156
+ :watch_app => 'com.apple.product-type.application.watchapp',
157
+ :watch2_app => 'com.apple.product-type.application.watchapp2',
158
+ :watch2_app_container => 'com.apple.product-type.application.watchapp2-container',
159
+ :watch_extension => 'com.apple.product-type.watchkit-extension',
160
+ :watch2_extension => 'com.apple.product-type.watchkit2-extension',
161
+ :tv_extension => 'com.apple.product-type.tv-app-extension',
162
+ :messages_application => 'com.apple.product-type.application.messages',
163
+ :messages_extension => 'com.apple.product-type.app-extension.messages',
164
+ :sticker_pack => 'com.apple.product-type.app-extension.messages-sticker-pack',
165
+ :xpc_service => 'com.apple.product-type.xpc-service',
161
166
  }.freeze
162
167
 
163
168
  # @return [Hash] The extensions or the various product UTIs.
164
169
  #
165
170
  PRODUCT_UTI_EXTENSIONS = {
166
- :application => 'app',
167
- :framework => 'framework',
168
- :dynamic_library => 'dylib',
169
- :static_library => 'a',
170
- :bundle => 'bundle',
171
- :octest_bundle => 'octest',
172
- :unit_test_bundle => 'xctest',
173
- :ui_test_bundle => 'xctest',
174
- :app_extension => 'appex',
175
- :messages_application => 'app',
176
- :messages_extension => 'appex',
177
- :sticker_pack => 'appex',
178
- :watch2_extension => 'appex',
179
- :watch2_app => 'app',
180
- :watch2_app_container => 'app',
171
+ :application => 'app',
172
+ :application_on_demand_install_capable => 'app',
173
+ :framework => 'framework',
174
+ :dynamic_library => 'dylib',
175
+ :static_library => 'a',
176
+ :bundle => 'bundle',
177
+ :octest_bundle => 'octest',
178
+ :unit_test_bundle => 'xctest',
179
+ :ui_test_bundle => 'xctest',
180
+ :app_extension => 'appex',
181
+ :messages_application => 'app',
182
+ :messages_extension => 'appex',
183
+ :sticker_pack => 'appex',
184
+ :watch2_extension => 'appex',
185
+ :watch2_app => 'app',
186
+ :watch2_app_container => 'app',
181
187
  }.freeze
182
188
 
183
189
  # @return [Hash] The common build settings grouped by platform, and build
@@ -198,11 +204,9 @@ module Xcodeproj
198
204
  }.freeze,
199
205
  [:ios] => {
200
206
  'SDKROOT' => 'iphoneos',
201
- 'CODE_SIGN_IDENTITY' => 'iPhone Developer',
202
207
  }.freeze,
203
208
  [:osx] => {
204
209
  'SDKROOT' => 'macosx',
205
- 'CODE_SIGN_IDENTITY' => '-',
206
210
  }.freeze,
207
211
  [:tvos] => {
208
212
  'SDKROOT' => 'appletvos',
@@ -251,7 +255,6 @@ module Xcodeproj
251
255
  [:debug, :static_library, :swift] => {
252
256
  }.freeze,
253
257
  [:framework] => {
254
- 'CODE_SIGN_IDENTITY' => '',
255
258
  'CURRENT_PROJECT_VERSION' => '1',
256
259
  'DEFINES_MODULE' => 'YES',
257
260
  'DYLIB_COMPATIBILITY_VERSION' => '1',
@@ -269,7 +272,6 @@ module Xcodeproj
269
272
  }.freeze,
270
273
  [:osx, :framework] => {
271
274
  'COMBINE_HIDPI_IMAGES' => 'YES',
272
- 'FRAMEWORK_VERSION' => 'A',
273
275
  'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) @executable_path/../Frameworks @loader_path/Frameworks',
274
276
  }.freeze,
275
277
  [:watchos, :framework] => {
@@ -311,6 +313,7 @@ module Xcodeproj
311
313
  }.freeze,
312
314
  [:application] => {
313
315
  'ASSETCATALOG_COMPILER_APPICON_NAME' => 'AppIcon',
316
+ 'ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME' => 'AccentColor',
314
317
  }.freeze,
315
318
  [:ios, :application] => {
316
319
  'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) @executable_path/Frameworks',
@@ -326,10 +329,12 @@ module Xcodeproj
326
329
  }.freeze,
327
330
  [:tvos, :application] => {
328
331
  'ASSETCATALOG_COMPILER_APPICON_NAME' => 'App Icon & Top Shelf Image',
329
- 'ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME' => 'LaunchImage',
330
332
  'LD_RUNPATH_SEARCH_PATHS' => '$(inherited) @executable_path/Frameworks',
331
333
  'TARGETED_DEVICE_FAMILY' => '3',
332
334
  }.freeze,
335
+ [:tvos, :application, :swift] => {
336
+ 'ENABLE_PREVIEWS' => 'YES',
337
+ }.freeze,
333
338
  [:watchos, :application, :swift] => {
334
339
  'ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES' => 'YES',
335
340
  }.freeze,
@@ -375,6 +380,7 @@ module Xcodeproj
375
380
  'CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF' => 'YES',
376
381
  'CLANG_WARN_OBJC_LITERAL_CONVERSION' => 'YES',
377
382
  'CLANG_WARN_OBJC_ROOT_CLASS' => 'YES_ERROR',
383
+ 'CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER' => 'YES',
378
384
  'CLANG_WARN_RANGE_LOOP_ANALYSIS' => 'YES',
379
385
  'CLANG_WARN_STRICT_PROTOTYPES' => 'YES',
380
386
  'CLANG_WARN_SUSPICIOUS_MOVE' => 'YES',
@@ -1,5 +1,5 @@
1
1
  module Xcodeproj
2
2
  # The version of the xcodeproj gem.
3
3
  #
4
- VERSION = '1.15.0'.freeze unless defined? Xcodeproj::VERSION
4
+ VERSION = '1.19.0'.freeze unless defined? Xcodeproj::VERSION
5
5
  end
@@ -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.
@@ -52,7 +52,9 @@ module Xcodeproj
52
52
  prefix = 'lib'
53
53
  end
54
54
  extension = Constants::PRODUCT_UTI_EXTENSIONS[product_type]
55
- ref = new_reference(group, "#{prefix}#{target_name}.#{extension}", :built_products)
55
+ path = "#{prefix}#{target_name}"
56
+ path += ".#{extension}" if extension
57
+ ref = new_reference(group, path, :built_products)
56
58
  ref.include_in_index = '0'
57
59
  ref.set_explicit_file_type
58
60
  ref
@@ -148,7 +148,7 @@ module Xcodeproj
148
148
  when '<group>'
149
149
  object_parent = parent(object)
150
150
  if object_parent.isa == 'PBXProject'.freeze
151
- object.project.project_dir
151
+ object.project.project_dir + object.project.root_object.project_dir_path
152
152
  else
153
153
  real_path(object_parent)
154
154
  end
@@ -73,6 +73,7 @@ module Xcodeproj
73
73
  hash = {}
74
74
  hash['displayName'] = display_name
75
75
  hash['isa'] = isa
76
+ hash['targetProxy'] = target_proxy.to_tree_hash
76
77
  hash
77
78
  end
78
79
 
@@ -59,6 +59,20 @@ module Xcodeproj
59
59
  end
60
60
  end
61
61
 
62
+ # @param [Array<BuildAction::Entry>] entries
63
+ # Sets the list of BuildActionEntry nodes associated with this Build Action.
64
+ #
65
+ def entries=(entries)
66
+ @xml_element.delete_element('BuildActionEntries')
67
+ unless entries.empty?
68
+ entries_element = @xml_element.add_element('BuildActionEntries')
69
+ entries.each do |entry_node|
70
+ entries_element.add_element(entry_node.xml_element)
71
+ end
72
+ end
73
+ entries
74
+ end
75
+
62
76
  # @param [BuildAction::Entry] entry
63
77
  # The BuildActionEntry to add to the list of targets to build for the various actions
64
78
  #
@@ -185,6 +199,13 @@ module Xcodeproj
185
199
  def add_buildable_reference(ref)
186
200
  @xml_element.add_element(ref.xml_element)
187
201
  end
202
+
203
+ # @param [BuildableReference] ref
204
+ # The BuildableReference to remove from the list of targets this entry will build
205
+ #
206
+ def remove_buildable_reference(ref)
207
+ @xml_element.delete_element(ref.xml_element)
208
+ end
188
209
  end
189
210
  end
190
211
  end
@@ -143,6 +143,22 @@ module Xcodeproj
143
143
  @xml_element.add_element(arguments.xml_element) if arguments
144
144
  arguments
145
145
  end
146
+
147
+ # @return [Array<MacroExpansion>]
148
+ # The list of MacroExpansion bound with this LaunchAction
149
+ #
150
+ def macro_expansions
151
+ @xml_element.get_elements('MacroExpansion').map do |node|
152
+ MacroExpansion.new(node)
153
+ end
154
+ end
155
+
156
+ # @param [MacroExpansion] macro_expansion
157
+ # Add a MacroExpansion to this LaunchAction
158
+ #
159
+ def add_macro_expansion(macro_expansion)
160
+ @xml_element.add_element(macro_expansion.xml_element)
161
+ end
146
162
  end
147
163
  end
148
164
  end
@@ -76,6 +76,18 @@ module Xcodeproj
76
76
  end
77
77
  end
78
78
 
79
+ # @param [Array<TestableReference>] testables
80
+ # Sets the list of TestableReference (test bundles) associated with this Test Action
81
+ #
82
+ def testables=(testables)
83
+ @xml_element.delete_element('Testables')
84
+ testables_element = @xml_element.add_element('Testables')
85
+ testables.each do |testable|
86
+ testables_element.add_element(testable.xml_element)
87
+ end
88
+ testables
89
+ end
90
+
79
91
  # @param [TestableReference] testable
80
92
  # Add a TestableReference (test bundle) to this Test Action
81
93
  #
@@ -219,6 +231,13 @@ module Xcodeproj
219
231
  @xml_element.add_element(ref.xml_element)
220
232
  end
221
233
 
234
+ # @param [BuildableReference] ref
235
+ # The BuildableReference to remove from the list of targets this entry will build
236
+ #
237
+ def remove_buildable_reference(ref)
238
+ @xml_element.delete_element(ref.xml_element)
239
+ end
240
+
222
241
  # @return [Array<Test>]
223
242
  # The list of SkippedTest this action will skip.
224
243
  #
@@ -107,8 +107,9 @@ module Xcodeproj
107
107
  else
108
108
  raise ArgumentError, "Input to the << operator must be a file path or FileReference, got #{path_or_reference.inspect}"
109
109
  end
110
-
111
- @document.root.add_element(project_file_reference.to_node)
110
+ unless file_references.any? { |ref| project_file_reference.eql? ref }
111
+ @document.root.add_element(project_file_reference.to_node)
112
+ end
112
113
  load_schemes_from_project File.expand_path(projpath || project_file_reference.path)
113
114
  end
114
115
 
@@ -13,7 +13,7 @@ module Xcodeproj
13
13
  # @param [#to_s] type @see type
14
14
  #
15
15
  def initialize(path, type = 'group')
16
- @path = path.to_s
16
+ @path = Pathname.new(path.to_s).cleanpath.to_s
17
17
  @type = type.to_s
18
18
  end
19
19
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcodeproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.0
4
+ version: 1.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-04 00:00:00.000000000 Z
11
+ date: 2020-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: atomos
@@ -84,14 +84,14 @@ dependencies:
84
84
  requirements:
85
85
  - - "~>"
86
86
  - !ruby/object:Gem::Version
87
- version: 0.2.6
87
+ version: 0.3.0
88
88
  type: :runtime
89
89
  prerelease: false
90
90
  version_requirements: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - "~>"
93
93
  - !ruby/object:Gem::Version
94
- version: 0.2.6
94
+ version: 0.3.0
95
95
  description: Xcodeproj lets you create and modify Xcode projects from Ruby. Script
96
96
  boring management tasks or build Xcode-friendly libraries. Also includes support
97
97
  for Xcode workspaces (.xcworkspace) and configuration files (.xcconfig).
@@ -168,7 +168,7 @@ homepage: https://github.com/cocoapods/xcodeproj
168
168
  licenses:
169
169
  - MIT
170
170
  metadata: {}
171
- post_install_message:
171
+ post_install_message:
172
172
  rdoc_options: []
173
173
  require_paths:
174
174
  - lib
@@ -183,8 +183,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  - !ruby/object:Gem::Version
184
184
  version: '0'
185
185
  requirements: []
186
- rubygems_version: 3.0.3
187
- signing_key:
186
+ rubygems_version: 3.1.2
187
+ signing_key:
188
188
  specification_version: 3
189
189
  summary: Create and modify Xcode projects from Ruby.
190
190
  test_files: []