cocoapods-bb-xcframework 0.2.4.1 → 0.2.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: 44334b003db5f637575546f87da1abf68deb9aa4d31a4c1b23884ffa5d0dc96a
4
- data.tar.gz: 14591a0139ff117858f596ef6449260da925cfec90fe1692516758cd6eb7d824
3
+ metadata.gz: f98fbc6d1facd7259f106f15bc4baae1d7d42e4fbdde07f87e2418ad5d631631
4
+ data.tar.gz: ac5b4b39621ccb83012f6dbb22e136495e00bf0b75177a8f49eabb16d631019f
5
5
  SHA512:
6
- metadata.gz: cef57cd8d3655596578026c28a133ffa16f5fe13096fe4d78f4f05475574abc8d7539f5d3cb819c3975a0c15cd9cabe5af77504592deedb66ee847c0151ed55a
7
- data.tar.gz: e13aba5936cf45104896b913cc994f5b0ab273e2694bb8cd462837a95cde2b3ac6f0d1a66e6ce5a2eb5d4e2fbf67e0438e8da3dde5d9e7baaaecae642c4177d1
6
+ metadata.gz: f949933c7e4c8d292583e1d6b228bb1ee312dc05d34c2d7dc7fce4d25dab8af19b1ad855f1388ca482e9d0c7fef53f3206f231127437131f381e1e6a0952dc15
7
+ data.tar.gz: 3ca5be14ad4b76e620849d0bc85be6e9a4c8cef510942be395ce9e8b4151e834f44f38892f3492c9e5755444bc6380ba9f88d71e2ef021b2d02371ae0dcf827d
data/README.md CHANGED
@@ -12,7 +12,8 @@
12
12
  - 支持 `Xcode` 新特性: `xcframework`
13
13
  - 支持 `cocoapods` 绝大多数属性
14
14
  - 支持 `subspec` 打包
15
- - 支持二进制库是否生成符号表,默认生成,详见`pod xcframework --help`
15
+ - 支持二进制库是否`生成符号表`、`生成Mac Catalyst`(默认生成)详见`pod xcframework --help`
16
+ - 支持Xcode14打包,去除armv7/i386架构
16
17
 
17
18
  ## Installation
18
19
 
@@ -57,6 +58,9 @@ Options:
57
58
  bitcode
58
59
  --no-symbols package not use
59
60
  symbols
61
+ --no-support-maccatalyst package support
62
+ generate
63
+ MacCatalyst
60
64
  --allow-root Allows CocoaPods
61
65
  to run as root
62
66
  --silent Show nothing
@@ -1,3 +1,3 @@
1
1
  module CocoapodsXCFramework
2
- VERSION = "0.2.4.1"
2
+ VERSION = "0.2.5"
3
3
  end
@@ -241,7 +241,7 @@ module Pod
241
241
  Dir.glob("#{xcframework_path}/*/").each do |file|
242
242
  ['ios','macos','tvos', 'watchos'].each do |prefix|
243
243
  last_path = file.split("/").last
244
- if last_path =~ /#{prefix}/ and not last_path =~ /simulator/
244
+ if last_path =~ /#{prefix}/ and not last_path =~ /simulator/ and not last_path =~ /maccatalyst/
245
245
  platform = to_native_platform prefix
246
246
  if spec_hash[platform]
247
247
  spec_hash[platform]["public_header_files"] = "#{spec_hash[:vendored_frameworks]}/#{last_path}/*/Headers/*.h"
@@ -1,23 +1,60 @@
1
1
  module Pod
2
2
  class XBuilder
3
3
  module XcodeXBuilder
4
+ # 调用方法来获取当前Xcode版本
5
+ def xcode_version
6
+ xcode_version_output = `xcode-select -p`
7
+ return nil if xcode_version_output.empty?
8
+
9
+ xcode_path = xcode_version_output.chomp
10
+ version_output = `xcodebuild -version`
11
+
12
+ # Extract the Xcode version number
13
+ version_match = version_output.match(/Xcode (\d+(\.\d+)+)/)
14
+ return nil if version_match.nil?
15
+
16
+ xcode_version = version_match[1]
17
+ return xcode_version
18
+ end
19
+ # xcode14以上,14以后不再支持armv7(32位设备)
20
+ def compare_xcode_14_version
21
+ current_version = xcode_version
22
+ if current_version.nil?
23
+ UI.puts("未找到安装的Xcode版本。")
24
+ else
25
+ UI.puts("当前Xcode版本:#{current_version}")
26
+ num_ver = current_version.to_i
27
+ return num_ver >= 14
28
+ end
29
+ return false
30
+ end
31
+
4
32
  def xcode_xbuild(defines, configuration, work_dir, build_dir = 'export', platform = 'iOS', project = nil, scheme = nil, skip_install = false)
5
33
  if defined?(Pod::DONT_CODESIGN)
6
34
  defines = "#{defines} CODE_SIGN_IDENTITY=\"\" CODE_SIGNING_REQUIRED=NO"
7
35
  end
8
36
  pwd = Pathname.pwd
9
37
  Dir.chdir work_dir
38
+ # 判断当前Xcode版本是否大于14
39
+ above_ver_14 = compare_xcode_14_version
10
40
 
11
41
  if platform == 'macOS'
12
42
  destination = 'generic/platform=macOS,variant=Mac Catalyst,name=Any Mac'
13
43
  archs = 'x86_64 arm64'
14
44
  elsif platform == 'iOS Simulator'
15
45
  destination = 'generic/platform=iOS Simulator'
16
- # archs = 'x86_64 arm64'
17
- archs = 'x86_64 i386 arm64' # swift库针对M1芯片移除x86架构,故模拟器添加i386,解决maccatalyst能正常生成
46
+ if above_ver_14 # 14以后不支持32位设备
47
+ archs = 'x86_64 arm64'
48
+ else
49
+ archs = 'x86_64 i386 arm64' # swift库针对M1芯片移除x86架构,故模拟器添加i386,解决maccatalyst能正常生成
50
+ end
18
51
  else
19
52
  destination = 'generic/platform=iOS'
20
- archs = 'arm64 armv7'
53
+ if above_ver_14 # 14以后不支持32位设备
54
+ archs = 'arm64'
55
+ else
56
+ archs = 'arm64 armv7'
57
+ end
21
58
  end
22
59
  if skip_install
23
60
  skip_install = 'YES'
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.4.1
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - humin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-18 00:00:00.000000000 Z
11
+ date: 2023-05-31 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.3
109
+ rubygems_version: 3.4.12
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: 把podspec打包成xcframework的小工具。packager pod to a xcframework