pod-builder 4.4.4 → 4.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +4 -0
- data/lib/pod_builder/configuration.rb +9 -0
- data/lib/pod_builder/podfile.rb +15 -1
- data/lib/pod_builder/rome/post_install.rb +8 -1
- data/lib/pod_builder/templates/build_podfile.template +10 -0
- data/lib/pod_builder/version.rb +1 -1
- data/pod-builder.gemspec +2 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 206523829a1e643a482035efc05301e608b0516278c4f7edf8de424bc5fc5437
|
4
|
+
data.tar.gz: 6b4297d656723d6f73bf2f0972485b9e2fcb717937a86e1191f943e69f4042da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ce7485f856f3be1f1b0f2a9a96144c9fe9eaadb1ccfd8d0db0be8019cb24e598a917baf376aaee6b5ef6c0a89f79228125e5b5cec75fd6b415cb4bd01878e0c
|
7
|
+
data.tar.gz: 6e1a110a204c3cb7e41803590743b6c5f1515ad16aafa0f05afd7ad167853f700d8029b18aec423dae2f3efe6ec22e822a653e3afc2b455835c3446666dab749
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -371,6 +371,10 @@ PodBuilder leverages CocoaPods to compile pods into frameworks. Every compiled f
|
|
371
371
|
|
372
372
|
# FAQ
|
373
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
|
+
|
374
378
|
### **I get an _'`PodWithError` does not specify a Swift version and none of the targets (`DummyTarget`)'_ when building**
|
375
379
|
|
376
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_.
|
@@ -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
|
data/lib/pod_builder/podfile.rb
CHANGED
@@ -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
|
-
|
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
|
data/lib/pod_builder/version.rb
CHANGED
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"
|
29
|
-
spec.add_development_dependency "debase", '0.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.
|
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-
|
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
|
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
|
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.
|
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.
|
68
|
+
version: 0.2.5.beta2
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: xcodeproj
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|