cocoapods-bb-xcframework 0.2.6 → 0.2.6.2

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: 22e95ef47a755371fe5138674d018ed4a05e4ec8d54806fe57e7cbdc95c3bca3
4
- data.tar.gz: 91127f23608399c2031ef9245d4e194fca6f63f2a87763ac5cc6f5d8349a261d
3
+ metadata.gz: 86de5787fc0f9a46661f7ebfd6c0cc0ef65f22a879cd1dc7c2925d130a58e2a9
4
+ data.tar.gz: 2b0acbb4860569d5b3db5367ac3a4262a707d0197db2d395dc1b7e34beb89d5d
5
5
  SHA512:
6
- metadata.gz: 5c673977a36ecff7e43e0817af91471f60aeb56b52074386aead8222b374d5d86358b1e392938d6e0704fe6b6f8237fd33c057ffd5cb380c414e326f0713b807
7
- data.tar.gz: ba6d977bee0cfea4d35f55bba4bc184661168cb753d4729734bd6df6f5a98326ac97b9bde04edb819caefedacb9226ee7491a78ecf913325c0565a5ed80d1131
6
+ metadata.gz: 5317a8a583129ad146fffacd4b8b105a36967ade03d19a565b1029a17c1692b4964b7e09ec1830ef35424ee9f5e8691d7fc0eaba63372c6de6b0407df84ac915
7
+ data.tar.gz: 020f0ccc7d37338714eef9e7d09cdf33bfe0ac5997711b792cc6fe9ff4c9aa85ea1f09916d4721b99281074a810ec0e6a68daee0320cd70b579eb6c0ce12794c
@@ -64,6 +64,7 @@ module Pod
64
64
  end
65
65
 
66
66
  def run
67
+ UI.puts "argvs @name:#{@name} @source:#{@source} @spec_sources:#{@spec_sources}"
67
68
  frameworker = Frameworker.new(@name, @source, @spec_sources, @subspecs, @configuration, @force, @use_modular_headers, @enable_bitcode, @symbols, @support_maccatalyst, @support_dynamic)
68
69
  frameworker.run
69
70
  end
@@ -19,6 +19,7 @@ module Pod
19
19
 
20
20
  def run
21
21
  spec = spec_with_path @name
22
+ UI.warn "正在生成XCFramework #{spec.name}(#{spec.version})"
22
23
  @is_spec_from_path = true if spec
23
24
  spec ||= spec_with_name @name
24
25
 
@@ -42,7 +43,8 @@ module Pod
42
43
  @spec_sources,
43
44
  true,
44
45
  @use_modular_headers,
45
- @enable_bitcode
46
+ @enable_bitcode,
47
+ @support_dynamic
46
48
  )
47
49
 
48
50
  perform_build(
@@ -63,8 +65,7 @@ module Pod
63
65
  spec,
64
66
  @configuration,
65
67
  @symbols,
66
- @support_maccatalyst,
67
- @support_dynamic
68
+ @support_maccatalyst
68
69
  )
69
70
  builder.build
70
71
  builder.outputs target_dir
@@ -1,3 +1,3 @@
1
1
  module CocoapodsXCFramework
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.6.2"
3
3
  end
@@ -63,7 +63,7 @@ module Pod
63
63
  Sandbox.new(config.sandbox_root)
64
64
  end
65
65
 
66
- def installation_root sandbox, spec, subspecs, sources,use_frameworks = true,use_modular_headers = true, enable_bitcode = false
66
+ def installation_root sandbox, spec, subspecs, sources,use_frameworks = true,use_modular_headers = true, enable_bitcode = false, support_dynamic=false
67
67
  podfile = podfile_from_spec(
68
68
  @path,
69
69
  spec,
@@ -72,6 +72,31 @@ module Pod
72
72
  use_frameworks,
73
73
  use_modular_headers
74
74
  )
75
+ other_flags=""
76
+ if support_dynamic
77
+ # 解析podspec获取依赖关系
78
+ spec.dependencies.uniq.each do |dependency|
79
+ other_flags << "-framework #{dependency.name} "
80
+ end
81
+ # spec.frameworks系统库没有提供公共方法,故手动解析引用系统库
82
+ spec_hash = spec.to_hash
83
+ spec_hash.uniq.each do |configuration|
84
+ key = configuration[0]
85
+ if key == 'frameworks'
86
+ val = configuration[1]
87
+ if val.is_a? String
88
+ other_flags << "-framework #{val} "
89
+ elsif val.is_a? Array
90
+ val.uniq.each do |item|
91
+ other_flags << "-framework #{item} "
92
+ end
93
+ else
94
+ UI.puts "configuration:#{configuration} val:#{val}"
95
+ end
96
+ end
97
+ end
98
+ end
99
+ UI.puts "support_dynamic:#{support_dynamic} other_flags: #{other_flags}"
75
100
 
76
101
  installer = Installer.new(sandbox, podfile)
77
102
  installer.repo_update = true
@@ -91,6 +116,16 @@ module Pod
91
116
  if target.name == spec.name
92
117
  target.build_configurations.each do |configuration|
93
118
  configuration.build_settings['CLANG_MODULES_AUTOLINK'] = 'NO'
119
+ # 动态链接库需要配置project工程库依赖,否则导致无法编译通过 by hm 23/7/13
120
+ if !other_flags.empty?
121
+ UI.puts "configuration other_flags: #{other_flags}"
122
+ configuration.build_settings['OTHER_LDFLAGS'] = "#{other_flags}"
123
+ end
124
+ if support_dynamic
125
+ configuration.build_settings['MACH_O_TYPE'] = 'mh_dylib'
126
+ else
127
+ configuration.build_settings['MACH_O_TYPE'] = 'staticlib'
128
+ end
94
129
  end
95
130
  end
96
131
  end
@@ -6,7 +6,7 @@ module Pod
6
6
  include XcodeProjHelper
7
7
  include PodUtil
8
8
  include Config::Mixin
9
- def initialize(installer, source_dir, sandbox_root, spec, configuration, symbols=true, support_maccatalyst=true, support_dynamic=false)
9
+ def initialize(installer, source_dir, sandbox_root, spec, configuration, symbols=true, support_maccatalyst=true)
10
10
  # def initialize(platform, installer, source_dir, sandbox_root, spec, config)
11
11
  # @platform = platform
12
12
  @installer = installer
@@ -21,35 +21,20 @@ module Pod
21
21
  @outputs = Hash.new
22
22
  @symbols = symbols
23
23
  @support_maccatalyst = support_maccatalyst
24
- @support_dynamic = support_dynamic
25
24
  end
26
25
 
27
26
  def build
28
27
  UI.puts("Building framework #{@spec} with configuration #{@configuration}")
29
- UI.puts "Work dir is :#{@sandbox_root} isSymbols:#{@symbols} isDynamic:#{@support_dynamic}"
28
+ UI.puts "Work dir is :#{@sandbox_root} isSymbols:#{@symbols}"
30
29
  # defines = "GCC_PREPROCESSOR_DEFINITIONS='$(inherited) PodsDummy_Pods_#{@spec.name}=PodsDummy_PodPackage_#{@spec.name}'"
31
30
  defines = ""
32
31
  if @configuration == 'Debug'
33
- if @support_dynamic
34
- defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=YES ONLY_ACTIVE_ARCH=NO MACH_O_TYPE=mh_dylib OTHER_LDFLAGS="-ObjC -framework UIKit"' # OTHER_LDFLAGS 动态库工程不会自动导入系统库
35
- else
36
- defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=YES ONLY_ACTIVE_ARCH=NO MACH_O_TYPE=staticlib'
37
- end
32
+ defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=YES ONLY_ACTIVE_ARCH=NO'
38
33
  else
39
34
  if @symbols
40
- if @support_dynamic
41
- defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=YES MACH_O_TYPE=mh_dylib OTHER_LDFLAGS="-ObjC -framework UIKit"' # OTHER_LDFLAGS 动态库工程不会自动导入系统库
42
- else
43
- defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=YES MACH_O_TYPE=staticlib'
44
- end
45
- # defines << "GCC_GENERATE_DEBUGGING_SYMBOLS=YES" # Release模式需要符号表应于问题排查(二进制切源码操作) by hm 21/10/13
35
+ defines << "GCC_GENERATE_DEBUGGING_SYMBOLS=YES" # Release模式需要符号表应于问题排查(二进制切源码操作) by hm 21/10/13
46
36
  else
47
- if @support_dynamic
48
- defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=NO MACH_O_TYPE=mh_dylib OTHER_LDFLAGS="-ObjC -framework UIKit"' # OTHER_LDFLAGS 动态库工程不会自动导入系统库
49
- else
50
- defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=NO MACH_O_TYPE=staticlib'
51
- end
52
- # defines << "GCC_GENERATE_DEBUGGING_SYMBOLS=NO" # 去除符号表
37
+ defines << "GCC_GENERATE_DEBUGGING_SYMBOLS=NO" # 去除符号表
53
38
  end
54
39
  end
55
40
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-bb-xcframework
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - humin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-12 00:00:00.000000000 Z
11
+ date: 2023-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cocoapods
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  - !ruby/object:Gem::Version
107
107
  version: '0'
108
108
  requirements: []
109
- rubygems_version: 3.4.14
109
+ rubygems_version: 3.4.16
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: 把podspec打包成xcframework的小工具。packager pod to a xcframework