pod-builder 4.4.2 → 4.4.5

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: f7a2abe8fcb659b07c1a6819579093c791eca94d882888098e65c75c7ea9b260
4
- data.tar.gz: f709a74f3bceee3acc9e57817706165c32693fbdc32b777b403c2257f9712889
3
+ metadata.gz: 206523829a1e643a482035efc05301e608b0516278c4f7edf8de424bc5fc5437
4
+ data.tar.gz: 6b4297d656723d6f73bf2f0972485b9e2fcb717937a86e1191f943e69f4042da
5
5
  SHA512:
6
- metadata.gz: cc2172d216372bf012494106b70f93a6aaee0001e493a890067b7206020cb4340015766575f90b5e91ef736e1884dc16f93cd22749ae0cb6e82dce51a8d4fb53
7
- data.tar.gz: baea42573bb858669fb0e91b1fc798301e88fee53808baab62247e89e89bdd068f2d11c65d8a5f8f6a64fbd029649fb9c6e93661618ea911851165d4155f0d66
6
+ metadata.gz: 4ce7485f856f3be1f1b0f2a9a96144c9fe9eaadb1ccfd8d0db0be8019cb24e598a917baf376aaee6b5ef6c0a89f79228125e5b5cec75fd6b415cb4bd01878e0c
7
+ data.tar.gz: 6e1a110a204c3cb7e41803590743b6c5f1515ad16aafa0f05afd7ad167853f700d8029b18aec423dae2f3efe6ec22e822a653e3afc2b455835c3446666dab749
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- ruby '2.6.3'
3
+ ruby '3.0.3'
4
4
 
5
5
  git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
6
6
 
data/README.md CHANGED
@@ -71,6 +71,7 @@ PodBuilder comes with a rich set of commands:
71
71
  - `restore_all`: rebuilts all pods declared in the Restore-Podfile file
72
72
  - `install_sources`: installs sources of pods to debug into prebuild frameworks
73
73
  - `switch`: switch between prebuilt, development or standard pod in the Application-Podfile
74
+ - `switch_all`: switch all pods between prebuilt, development or standard in the Application-Podfile
74
75
  - `clean`: removes unused prebuilt frameworks, dSYMs and source files added by install_sources
75
76
  - `sync_podfile`: updates the Application-Podfile with all pods declared in the PodBuilder-Podfile file
76
77
  - `info`: outputs json-formatted information reflecting the current status of prebuilt pods
@@ -158,6 +159,10 @@ To support development pods you should specify the path(s) that contain the pods
158
159
 
159
160
  PodBuilder will automatically determine the proper path when switching a particular pod.
160
161
 
162
+ #### `switch_all` command
163
+
164
+ As `switch` but will switch all pods defined in PodBuilder-Podfile.
165
+
161
166
  #### `clean` command
162
167
 
163
168
  Deletes all unused files by PodBuilder, including .frameworks, .dSYMs and _Source_ repos.
@@ -366,6 +371,10 @@ PodBuilder leverages CocoaPods to compile pods into frameworks. Every compiled f
366
371
 
367
372
  # FAQ
368
373
 
374
+ ### **I get an _'Failed getting 'DEVELOPMENT_TEAM' build setting'_ when building**
375
+
376
+ PodBuilder might fail to automatically extract the developer team from your current project which is required to sign executables. Add the `development_team` key in PodBuilder.json file with your development team identifier.
377
+
369
378
  ### **I get an _'`PodWithError` does not specify a Swift version and none of the targets (`DummyTarget`)'_ when building**
370
379
 
371
380
  The podspec of the Pod you're trying to build doesn't specify the swift_version which is required in recent versions of CocoaPods. Either contact the author/mantainer of the Pod asking it to fix the podspec or add a `spec_overrides` in _PodBuilder.json_.
data/exe/pod_builder CHANGED
@@ -41,6 +41,7 @@ Command:
41
41
  + install_sources Install sources of pods to debug into prebuilt items
42
42
  + generate_lldbinit Generate an lldbinit file with setting target.source-map to debug prebuilt items
43
43
  + switch Switch between prebuilt/development/standard pod in the Application-Podfile
44
+ + switch_all Switch all pods between prebuilt/development/standard in the Application-Podfile
44
45
  + clean Remove prebuild items, dSYMs and source files added by `install_sources` command that are no longer in the PodBuilder-Podfile
45
46
  + sync_podfile Update your Application-Podfile with all pods declared in the PodBuilder-Podfile
46
47
  + info Print json-formatted informations about prebuilt items
@@ -316,6 +317,41 @@ Options:
316
317
  ]
317
318
  },
318
319
 
320
+ "switch_all" => {
321
+ :opts => OptionParser.new do |opts|
322
+ opts.banner = "
323
+ Usage:
324
+
325
+ $ pod_builder switch_all [OPTIONS]
326
+
327
+ Switch all pods integration between prebuilt/development/default version.
328
+
329
+ Options:
330
+ "
331
+ opts.on("-p", "--prebuilt", "Use prebuilt") do |o|
332
+ OPTIONS[:switch_mode] = "prebuilt"
333
+ end
334
+ opts.on("-d", "--development", "Development pod") do |o|
335
+ OPTIONS[:switch_mode] = "development"
336
+ end
337
+ opts.on("-s", "--default", "Default version specified in PodBuilder-Podfile") do |o|
338
+ OPTIONS[:switch_mode] = "default"
339
+ end
340
+ opts.on("-c", "--child-deps", "Include dependencies of the specified <PODNAME...>") do |o|
341
+ OPTIONS[:resolve_child_dependencies] = true
342
+ end
343
+ opts.on("-r", "--parent-deps", "Include all pods that depend on the specified <PODNAME...>") do |o|
344
+ OPTIONS[:resolve_parent_dependencies] = true
345
+ end
346
+ opts.on("-u", "--skip-repo-update", "Skip CocoaPods repo update (only when passing --parent-deps") do |o|
347
+ OPTIONS[:update_repos] = false
348
+ end
349
+ end,
350
+ :call => [
351
+ PodBuilder::Command::SwitchAll
352
+ ]
353
+ },
354
+
319
355
  "sync_podfile" => {
320
356
  :opts => OptionParser.new do |opts|
321
357
  opts.banner = "
@@ -9,7 +9,22 @@ module PodBuilder
9
9
  PodBuilder::prepare_basepath
10
10
 
11
11
  argument_pods = ARGV.dup
12
-
12
+ switch_all = argument_pods.first == "*"
13
+
14
+ if switch_all
15
+ pods = []
16
+ podspecs = Dir.glob("#{PodBuilder::prebuiltpath}/**/*.podspec")
17
+ podspecs.each do |podspec|
18
+ spec = Pod::Specification.from_file(podspec)
19
+ podname = spec.attributes_hash["name"]
20
+ pods.push(podname)
21
+ end
22
+ argument_pods = pods
23
+ if OPTIONS[:switch_mode] == "development"
24
+ argument_pods.reject! { |pod_name| self.find_podspec(pod_name).nil? }
25
+ end
26
+ end
27
+
13
28
  unless argument_pods.count > 0
14
29
  return -1
15
30
  end
@@ -235,7 +250,7 @@ module PodBuilder
235
250
  if Pathname.new(path).relative?
236
251
  path = PodBuilder::basepath(path)
237
252
  end
238
- podspec_paths = Dir.glob(File.expand_path("#{path}/**/#{podname}*.podspec*"))
253
+ podspec_paths = Dir.glob(File.expand_path("#{path}/**/#{podname}.podspec"))
239
254
  podspec_paths.select! { |t| !t.include?("/Local Podspecs/") }
240
255
  podspec_paths.select! { |t| Dir.glob(File.join(File.dirname(t), "*")).count > 1 } # exclude podspec folder (which has one file per folder)
241
256
  if podspec_paths.count > 1
@@ -0,0 +1,15 @@
1
+ require 'pod_builder/core'
2
+
3
+ module PodBuilder
4
+ module Command
5
+ class SwitchAll
6
+ def self.call
7
+ Configuration.check_inited
8
+ PodBuilder::prepare_basepath
9
+
10
+ ARGV << "*"
11
+ return Command::Switch::call
12
+ end
13
+ end
14
+ end
15
+ end
@@ -9,6 +9,7 @@ require 'pod_builder/command/deintegrate'
9
9
  require 'pod_builder/command/generate_podspec'
10
10
  require 'pod_builder/command/install_sources'
11
11
  require 'pod_builder/command/switch'
12
+ require 'pod_builder/command/switch_all'
12
13
  require 'pod_builder/command/sync_podfile'
13
14
  require 'pod_builder/command/info'
14
15
  require 'pod_builder/command/generate_lldbinit'
@@ -77,6 +77,7 @@ module PodBuilder
77
77
  attr_accessor :build_xcframeworks_exclude
78
78
  attr_accessor :pre_actions
79
79
  attr_accessor :post_actions
80
+ attr_accessor :development_team
80
81
  end
81
82
 
82
83
  @build_settings = DEFAULT_BUILD_SETTINGS
@@ -116,6 +117,8 @@ module PodBuilder
116
117
 
117
118
  @pre_actions = {}
118
119
  @post_actions = {}
120
+
121
+ @development_team = ""
119
122
 
120
123
  def self.check_inited
121
124
  raise "\n\nNot inited, run `pod_builder init`\n".red if podbuilder_path.nil?
@@ -244,6 +247,11 @@ module PodBuilder
244
247
  Configuration.post_actions = PodBuilder::Actions.load(value)
245
248
  end
246
249
  end
250
+ if value = json["development_team"]
251
+ if value.is_a?(String) && value.length > 0
252
+ Configuration.development_team = value
253
+ end
254
+ end
247
255
 
248
256
  Configuration.build_settings.freeze
249
257
 
@@ -288,6 +296,7 @@ module PodBuilder
288
296
  config["deterministic_build"] = Configuration.deterministic_build
289
297
  config["build_using_repo_paths"] = Configuration.build_using_repo_paths
290
298
  config["react_native_project"] = Configuration.react_native_project
299
+ config["development_team"] = Configuration.development_team
291
300
 
292
301
  File.write(config_path, JSON.pretty_generate(config))
293
302
  end
@@ -8,6 +8,18 @@ module PodBuilder
8
8
  def self.from_podfile_items(items, analyzer, build_configuration, install_using_frameworks, build_catalyst, build_xcframeworks)
9
9
  raise "\n\nno items\n".red unless items.count > 0
10
10
 
11
+ # Xcode 14 requires a development team to be specified for the compilation to succeed
12
+ development_team = Configuration::development_team
13
+ if development_team.empty?
14
+ project_path = "#{PodBuilder.project_path}/#{Configuration::project_name}.xcodeproj"
15
+ development_team = `grep -rh 'DEVELOPMENT_TEAM' '#{project_path}' | uniq`.strip
16
+ development_team_match = development_team.match(/DEVELOPMENT_TEAM = (.+);/)
17
+ if development_team.split("\n").count != 1 || development_team_match&.size != 2
18
+ raise "\n\nFailed getting 'DEVELOPMENT_TEAM' build setting, please add your development team to #{PodBuilder::basepath(Configuration.configuration_filename)} as per documentation".red
19
+ end
20
+ development_team = development_team_match[1]
21
+ end
22
+
11
23
  sources = analyzer.sources
12
24
 
13
25
  cwd = File.dirname(File.expand_path(__FILE__))
@@ -27,10 +39,12 @@ module PodBuilder
27
39
 
28
40
  podfile.sub!("%%%build_configuration%%%", build_configuration.capitalize)
29
41
 
42
+ podfile.sub!("%%%development_team%%%", development_team)
43
+
30
44
  podfile_build_settings = ""
31
45
 
32
46
  pod_dependencies = {}
33
-
47
+
34
48
  items.each do |item|
35
49
  build_settings = Configuration.build_settings.dup
36
50
 
@@ -378,9 +378,16 @@ Pod::HooksManager.register('podbuilder-rome', :post_install) do |installer_conte
378
378
  module_name = File.basename(built_item_paths.first, ".*")
379
379
  spec = specs.detect { |t| t.module_name == module_name }
380
380
 
381
+ # There seems to be a potential bug in CocoaPods-Core (https://github.com/CocoaPods/Core/issues/730)
382
+ if spec.nil?
383
+ # Given the above issue when all specs of a pod are subspecs (e.g. specs contains Pod1/Subspec1, Pod1/Subspec2, ...) we'll fail getting the correct specification by relying on module name
384
+ spec = specs.detect { |t| t.name.split("/").first == module_name }
385
+ end
386
+
381
387
  next if spec.nil?
382
388
 
383
- xcframework_path = "#{base_destination}/#{spec.name}/#{module_name}.xcframework"
389
+ root_name = spec.name.split("/").first
390
+ xcframework_path = "#{base_destination}/#{root_name}/#{module_name}.xcframework"
384
391
  framework_params = built_item_paths.map { |t| "-framework '#{t}'"}.join(" ")
385
392
  raise "\n\nFailed packing xcframework!\n".red if !system("xcodebuild -create-xcframework #{framework_params} -output '#{xcframework_path}' > /dev/null 2>&1")
386
393
 
@@ -68,3 +68,13 @@ pre_install do |installer|
68
68
  Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
69
69
  Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_duplicate_framework_and_library_names) {}
70
70
  end
71
+
72
+ post_install do |installer|
73
+ installer.pods_project.targets.each do |target|
74
+ target.build_configurations.each do |config|
75
+ config.build_settings['DEVELOPMENT_TEAM'] = '%%%development_team%%%'
76
+ end
77
+ end
78
+
79
+ installer.pods_project.save
80
+ end
@@ -1,3 +1,3 @@
1
1
  module PodBuilder
2
- VERSION = "4.4.2"
2
+ VERSION = "4.4.5"
3
3
  end
data/pod-builder.gemspec CHANGED
@@ -25,8 +25,8 @@ Gem::Specification.new do |spec|
25
25
 
26
26
  spec.add_development_dependency "bundler", "~> 2.0"
27
27
  spec.add_development_dependency "rake", ">= 12.3.3"
28
- spec.add_development_dependency "ruby-debug-ide", '0.6.1'
29
- spec.add_development_dependency "debase", '0.2.2'
28
+ spec.add_development_dependency "ruby-debug-ide"
29
+ spec.add_development_dependency "debase", '0.2.5.beta2'
30
30
 
31
31
  spec.add_runtime_dependency 'xcodeproj'
32
32
  spec.add_runtime_dependency 'colored'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pod-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.2
4
+ version: 4.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Camin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-20 00:00:00.000000000 Z
11
+ date: 2022-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -42,30 +42,30 @@ dependencies:
42
42
  name: ruby-debug-ide
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.6.1
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.6.1
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: debase
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: 0.2.2
61
+ version: 0.2.5.beta2
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: 0.2.2
68
+ version: 0.2.5.beta2
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: xcodeproj
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -197,6 +197,7 @@ files:
197
197
  - lib/pod_builder/command/none.rb
198
198
  - lib/pod_builder/command/restore_all.rb
199
199
  - lib/pod_builder/command/switch.rb
200
+ - lib/pod_builder/command/switch_all.rb
200
201
  - lib/pod_builder/command/sync_podfile.rb
201
202
  - lib/pod_builder/command/update.rb
202
203
  - lib/pod_builder/configuration.rb