cocoapods-generate 2.2.2 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ec807085c21de2232ba62daad8b1a5cb014904ac95082163de14e1ee46cc9fc
4
- data.tar.gz: f03150d21af7d856c665e421ea98a37ec5114d622f0d775dc9e674a2c72ff5b3
3
+ metadata.gz: e678737eede01f12fa09ac0d4d64a23737ec7d659147d67a9e489bb64044709e
4
+ data.tar.gz: 82c0cf87922bed22879443ad965b8dd9795c6d0704fab11cbf2329570d4ce6ca
5
5
  SHA512:
6
- metadata.gz: 620f5d4fb25024442f8e697b47bfa1d30f47933e06d5467ade270b25a00fdce9f2de492bbbd3706674893ae30cf4c9633d25420e356933cbb83df7cff9820d94
7
- data.tar.gz: 5470965cdcdc8a68dba3bd14051ec0d6a819363b19440e2f1ad9ef42622036e839bb188a3e4eb2655b1a7d2739eda697382c1053d17a2078c71f02bbb3ff9d1c
6
+ metadata.gz: 458d65f261c92ff4fae69b24feab9693bc2f7a63503585b8dbdfc06aafd4e006a0a25556b6dd1d70a7213cb29a9a2d4668e4da8688dc1b628008f56fd23a0110
7
+ data.tar.gz: 90730f6a121011ee794f4c910135b47eee34ba177e1a1af620a6a96755d5d60f3a941b41179e25fbf9b17dc99cedabf5e3a11c5a0c618411fec2586eb8832478
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.2.2
1
+ 2.2.4
@@ -210,6 +210,12 @@ module Pod
210
210
  option :use_modular_headers, BOOLEAN, 'false', 'Whether the target should be generated as a clang module, treating dependencies as modules, as if `use_modular_headers!` were specified. Will error if both this option and a podfile are specified', nil, nil, coerce_to_bool
211
211
  option :single_workspace, BOOLEAN, 'false', 'Whether to produce a single workspace for all podspecs specified.', nil, nil, coerce_to_bool
212
212
  option :xcode_version, Pod::Version, 'Pod::Version.new(\'9.3\')', 'The Xcode version to use for producing the consumer sample project', 'xcode_version', nil, coerce_to_version
213
+ option :external_source_pods, ArrayOf.new(HashOf.new(keys: [String], values: [ArrayOf.new(HashOf.new(keys: [String], values: [String]))])),
214
+ [],
215
+ nil,
216
+ nil,
217
+ nil,
218
+ ->(external_sources) { Array(external_sources) }
213
219
 
214
220
  options.freeze
215
221
  options.each do |o|
@@ -7,6 +7,8 @@ module Pod
7
7
  DEFAULT_XCODE_VERSION = '9.3'.freeze
8
8
 
9
9
  XCODE_VERSION_TO_OBJECT_VERSION = {
10
+ '14.0' => 56,
11
+ '13.0' => 55,
10
12
  '12.0' => 54,
11
13
  '11.4' => 53,
12
14
  '11.0' => 52,
@@ -185,7 +187,7 @@ module Pod
185
187
  native_app_target.resources_build_phase.clear
186
188
 
187
189
  if (app_host_source_dir = configuration.app_host_source_dir)
188
- relative_app_host_source_dir = app_host_source_dir.relative_path_from(installer.sandbox.root)
190
+ relative_app_host_source_dir = app_host_source_dir.relative_path_from(install_directory)
189
191
  groups = {}
190
192
 
191
193
  app_host_source_dir.find do |file|
@@ -234,9 +236,13 @@ module Pod
234
236
  bc.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = 'org.cocoapods-generate.${PRODUCT_NAME:rfc1034identifier}'
235
237
  end
236
238
 
237
- case native_app_target.platform_name
239
+ case native_app_target.platform_name.to_sym
238
240
  when :ios
239
241
  make_ios_app_launchable(app_project, native_app_target)
242
+ when :osx
243
+ generate_infoplist_file(app_project, native_app_target)
244
+ when :tvos
245
+ generate_infoplist_file(app_project, native_app_target)
240
246
  end
241
247
 
242
248
  swift_version = pod_targets.map { |pt| Pod::Version.new(pt.swift_version) }.max.to_s
@@ -391,6 +397,15 @@ module Pod
391
397
  native_app_target.resources_build_phase.add_file_reference(launch_storyboard_file_ref)
392
398
  end
393
399
 
400
+ def generate_infoplist_file(_app_project, native_app_target)
401
+ # Starting in Xcode 14, there is an error when you build the macOS or
402
+ # tvOS app that is generated from cocoapods-generate. This implements
403
+ # the suggested change.
404
+ native_app_target.build_configurations.each do |bc|
405
+ bc.build_settings['GENERATE_INFOPLIST_FILE'] = 'YES'
406
+ end
407
+ end
408
+
394
409
  def group_for_platform_name(project, platform_name, should_create = true)
395
410
  project.main_group.find_subpath("App-#{platform_name}", should_create)
396
411
  end
@@ -31,6 +31,7 @@ module Pod
31
31
  generator = self
32
32
  dir = configuration.gen_dir_for_specs(specs)
33
33
  project_name = configuration.project_name_for_specs(specs)
34
+ external_source_pods = configuration.external_source_pods
34
35
 
35
36
  Pod::Podfile.new do
36
37
  project "#{project_name}.xcodeproj"
@@ -93,9 +94,19 @@ module Pod
93
94
  .reject { |d| spec_names.include?(d.root_name) }
94
95
 
95
96
  dependencies.each do |dependency|
96
- pod_args = generator.pod_args_for_dependency(self, dependency)
97
+ pod_args = generator.pod_args_for_podfile_dependency(self, dependency)
97
98
  pod(*pod_args)
98
99
  end
100
+
101
+ external_source_pods.each do |hash|
102
+ hash.each do |name, attrs|
103
+ next if spec_names.include?(name)
104
+
105
+ dependency = Dependency.new(name, attrs.first.deep_symbolize_keys)
106
+ pod_args = generator.pod_args_for_dependency(nil, dependency)
107
+ pod(*pod_args)
108
+ end
109
+ end
99
110
  end
100
111
 
101
112
  # Add platform-specific concrete targets that inherit the `pod` declaration for the local pod.
@@ -291,12 +302,23 @@ module Pod
291
302
  #
292
303
  # @param [Dependency] dependency
293
304
  #
294
- def pod_args_for_dependency(podfile, dependency)
305
+ def pod_args_for_podfile_dependency(podfile, dependency)
295
306
  dependency = podfile_dependencies[dependency.root_name]
296
307
  .map { |dep| dep.dup.tap { |d| d.name = dependency.name } }
297
308
  .push(dependency)
298
309
  .reduce(&:merge)
310
+ pod_args_for_dependency(podfile, dependency)
311
+ end
299
312
 
313
+ # @return [Hash<String,Array<Dependency>>]
314
+ # returns the arguments that should be passed to the Podfile DSL's
315
+ # `pod` method.
316
+ #
317
+ # @param [Podfile] podfile
318
+ #
319
+ # @param [Dependency] dependency
320
+ #
321
+ def pod_args_for_dependency(podfile, dependency)
300
322
  options = dependency_compilation_kwargs(dependency.name)
301
323
  options[:source] = dependency.podspec_repo if dependency.podspec_repo
302
324
  options.update(dependency.external_source) if dependency.external_source
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-generate
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Giddins
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-09 00:00:00.000000000 Z
11
+ date: 2023-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods-disable-podfile-validations
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.1.1
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 0.3.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: 0.1.1
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 0.3.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: bundler
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -101,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
107
  - !ruby/object:Gem::Version
102
108
  version: '0'
103
109
  requirements: []
104
- rubygems_version: 3.0.1
110
+ rubygems_version: 3.3.7
105
111
  signing_key:
106
112
  specification_version: 4
107
113
  summary: Generates Xcode workspaces from a podspec.