cocoapods-bb-xcframework 0.2.6 → 0.2.6.1

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: 22e95ef47a755371fe5138674d018ed4a05e4ec8d54806fe57e7cbdc95c3bca3
4
- data.tar.gz: 91127f23608399c2031ef9245d4e194fca6f63f2a87763ac5cc6f5d8349a261d
3
+ metadata.gz: '08c6a4feaf42fcaf08cf0850541fd0d64f28e2f35fce462bee195625b3aa02b1'
4
+ data.tar.gz: 2d10b0fdf6c83246d5858f21edade1cfa6c731099c3eae9931303144eecafd5b
5
5
  SHA512:
6
- metadata.gz: 5c673977a36ecff7e43e0817af91471f60aeb56b52074386aead8222b374d5d86358b1e392938d6e0704fe6b6f8237fd33c057ffd5cb380c414e326f0713b807
7
- data.tar.gz: ba6d977bee0cfea4d35f55bba4bc184661168cb753d4729734bd6df6f5a98326ac97b9bde04edb819caefedacb9226ee7491a78ecf913325c0565a5ed80d1131
6
+ metadata.gz: 21f47c1d01df0b98de368bb131f6f2f384f180c429f10bb20d7ff96d18cc19ed74d41747c517f0c1b94e743d6a6d75762e0656aeb9d82a220eecc69af61a8401
7
+ data.tar.gz: 19ab879bc014ef08bd422ba70fdd9e6caed3e8f5b0b8b802b7af8f4f5b493fea78fbe3674ca6fd028de95b0de03bdefebfe5e8b1fef0997090b60b32ae7405c3
@@ -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(
@@ -1,3 +1,3 @@
1
1
  module CocoapodsXCFramework
2
- VERSION = "0.2.6"
2
+ VERSION = "0.2.6.1"
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,23 @@ 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
+ other_flags << "-framework #{val} "
88
+ end
89
+ end
90
+ end
91
+ UI.puts "support_dynamic:#{support_dynamic} other_flags: #{other_flags}"
75
92
 
76
93
  installer = Installer.new(sandbox, podfile)
77
94
  installer.repo_update = true
@@ -91,6 +108,11 @@ module Pod
91
108
  if target.name == spec.name
92
109
  target.build_configurations.each do |configuration|
93
110
  configuration.build_settings['CLANG_MODULES_AUTOLINK'] = 'NO'
111
+ # 动态链接库需要配置project工程库依赖,否则导致无法编译通过 by hm 23/7/13
112
+ if !other_flags.empty?
113
+ UI.puts "configuration other_flags: #{other_flags}"
114
+ configuration.build_settings['OTHER_LDFLAGS'] = "#{other_flags}"
115
+ end
94
116
  end
95
117
  end
96
118
  end
@@ -31,21 +31,21 @@ module Pod
31
31
  defines = ""
32
32
  if @configuration == 'Debug'
33
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 动态库工程不会自动导入系统库
34
+ defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=YES ONLY_ACTIVE_ARCH=NO MACH_O_TYPE=mh_dylib'
35
35
  else
36
36
  defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=YES ONLY_ACTIVE_ARCH=NO MACH_O_TYPE=staticlib'
37
37
  end
38
38
  else
39
39
  if @symbols
40
40
  if @support_dynamic
41
- defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=YES MACH_O_TYPE=mh_dylib OTHER_LDFLAGS="-ObjC -framework UIKit"' # OTHER_LDFLAGS 动态库工程不会自动导入系统库
41
+ defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=YES MACH_O_TYPE=mh_dylib'
42
42
  else
43
43
  defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=YES MACH_O_TYPE=staticlib'
44
44
  end
45
45
  # defines << "GCC_GENERATE_DEBUGGING_SYMBOLS=YES" # Release模式需要符号表应于问题排查(二进制切源码操作) by hm 21/10/13
46
46
  else
47
47
  if @support_dynamic
48
- defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=NO MACH_O_TYPE=mh_dylib OTHER_LDFLAGS="-ObjC -framework UIKit"' # OTHER_LDFLAGS 动态库工程不会自动导入系统库
48
+ defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=NO MACH_O_TYPE=mh_dylib'
49
49
  else
50
50
  defines << 'GCC_GENERATE_DEBUGGING_SYMBOLS=NO MACH_O_TYPE=staticlib'
51
51
  end
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.1
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