cocoapods-bb-xcframework 0.1.0 → 0.2.0
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 +4 -4
- data/lib/cocoapods-xcframework/command/xcframework.rb +4 -2
- data/lib/cocoapods-xcframework/frameworker.rb +4 -2
- data/lib/cocoapods-xcframework/gem_version.rb +1 -1
- data/lib/cocoapods-xcframework/xbuilder/xcode_xbuild.rb +26 -2
- data/lib/cocoapods-xcframework/xbuilder.rb +21 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e88b2bd7f6366b8ae972cff3c8fa603a7ed878b81b90b8820967f1572e47e52
|
4
|
+
data.tar.gz: bacf8b9ae537bab39b094555c0eb593b46770d4ef19db2a2f4a98119aaba6bbc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab65288f3ff8891af5f60bf0d9ab628d427b2f7d14bb8db707b57dffc3c02eb1be7c7c98b696f571b3156715c04ef234c5ea83bdc52b5ff017819c59131cf96e
|
7
|
+
data.tar.gz: cdc4f5c8546499d55f870d26a8fa5e60221574618709d5a047f2036681cdb750e0f2d08bfb4fe826765b7a50a8c8418c25453208a5c8587fb5745afd58036c4a
|
@@ -34,7 +34,8 @@ module Pod
|
|
34
34
|
['--use-modular-headers', 'pakcage uses modular headers during packaging'],
|
35
35
|
['--no-static-library', 'package not use static library'],
|
36
36
|
['--enable-bitcode', 'package enable bitcode'],
|
37
|
-
['--no-symbols', 'package not use symbols'] # 符号表
|
37
|
+
['--no-symbols', 'package not use symbols'], # 符号表
|
38
|
+
['--no-support-maccatalyst', 'package support generate MacCatalyst'] # 是否支持MacCatalyst方式支持iOS应用在mac平台运行库生成
|
38
39
|
].concat super
|
39
40
|
end
|
40
41
|
|
@@ -50,6 +51,7 @@ module Pod
|
|
50
51
|
@use_static_library = argv.flag?('static-library',true)
|
51
52
|
@enable_bitcode = argv.flag?('enable-bitcode',false)
|
52
53
|
@symbols = argv.flag?('symbols',true)
|
54
|
+
@support_maccatalyst = argv.flag?('support-maccatalyst',true)
|
53
55
|
config.static_library_enable = @use_static_library
|
54
56
|
super
|
55
57
|
end
|
@@ -60,7 +62,7 @@ module Pod
|
|
60
62
|
end
|
61
63
|
|
62
64
|
def run
|
63
|
-
frameworker = Frameworker.new(@name, @source, @spec_sources, @subspecs, @configuration, @force, @use_modular_headers, @enable_bitcode, @symbols)
|
65
|
+
frameworker = Frameworker.new(@name, @source, @spec_sources, @subspecs, @configuration, @force, @use_modular_headers, @enable_bitcode, @symbols, @support_maccatalyst)
|
64
66
|
frameworker.run
|
65
67
|
end
|
66
68
|
end
|
@@ -3,7 +3,7 @@ module Pod
|
|
3
3
|
include PodUtil
|
4
4
|
include DirUtil
|
5
5
|
include Config::Mixin
|
6
|
-
def initialize(name, source, spec_sources, subspecs, configuration, force, use_modular_headers=true, enable_bitcode=false, symbols=true)
|
6
|
+
def initialize(name, source, spec_sources, subspecs, configuration, force, use_modular_headers=true, enable_bitcode=false, symbols=true, support_maccatalyst=true)
|
7
7
|
@name = name
|
8
8
|
@source = source
|
9
9
|
@spec_sources = spec_sources
|
@@ -13,6 +13,7 @@ module Pod
|
|
13
13
|
@use_modular_headers = use_modular_headers
|
14
14
|
@enable_bitcode = enable_bitcode
|
15
15
|
@symbols = symbols
|
16
|
+
@support_maccatalyst = support_maccatalyst
|
16
17
|
end
|
17
18
|
|
18
19
|
def run
|
@@ -60,7 +61,8 @@ module Pod
|
|
60
61
|
sandbox_root,
|
61
62
|
spec,
|
62
63
|
@configuration,
|
63
|
-
@symbols
|
64
|
+
@symbols,
|
65
|
+
@support_maccatalyst
|
64
66
|
)
|
65
67
|
builder.build
|
66
68
|
builder.outputs target_dir
|
@@ -1,13 +1,37 @@
|
|
1
1
|
module Pod
|
2
2
|
class XBuilder
|
3
3
|
module XcodeXBuilder
|
4
|
-
def xcode_xbuild(defines, configuration, work_dir, build_dir = 'export')
|
4
|
+
def xcode_xbuild(defines, configuration, work_dir, build_dir = 'export', platform = 'iOS', project = nil, scheme = nil, skip_install = false)
|
5
5
|
if defined?(Pod::DONT_CODESIGN)
|
6
6
|
defines = "#{defines} CODE_SIGN_IDENTITY=\"\" CODE_SIGNING_REQUIRED=NO"
|
7
7
|
end
|
8
8
|
pwd = Pathname.pwd
|
9
9
|
Dir.chdir work_dir
|
10
|
-
|
10
|
+
|
11
|
+
if platform == 'macOS'
|
12
|
+
destination = 'generic/platform=macOS,variant=Mac Catalyst,name=Any Mac'
|
13
|
+
archs = 'x86_64 arm64'
|
14
|
+
elsif platform == 'iOS Simulator'
|
15
|
+
destination = 'generic/platform=iOS Simulator'
|
16
|
+
archs = 'x86_64 i386 arm64'
|
17
|
+
else
|
18
|
+
destination = 'generic/platform=iOS'
|
19
|
+
archs = 'arm64 armv7'
|
20
|
+
end
|
21
|
+
if skip_install
|
22
|
+
skip_install = 'YES'
|
23
|
+
else
|
24
|
+
skip_install = 'NO'
|
25
|
+
end
|
26
|
+
if not project.nil?
|
27
|
+
if not scheme.nil?
|
28
|
+
command = "xcodebuild #{defines} BUILD_DIR=#{build_dir} BUILD_LIBRARY_FOR_DISTRIBUTION=YES clean build -configuration #{configuration} -project '#{project}' -scheme '#{scheme}' -destination '#{destination}' ARCHS='#{archs}' SKIP_INSTALL=#{skip_install} | xcpretty 2>&1"
|
29
|
+
else
|
30
|
+
command = "xcodebuild #{defines} BUILD_DIR=#{build_dir} BUILD_LIBRARY_FOR_DISTRIBUTION=YES clean build -configuration #{configuration} -alltargets -scheme '#{scheme}' -destination '#{destination}' ARCHS='#{archs}' SKIP_INSTALL=#{skip_install} | xcpretty 2>&1"
|
31
|
+
end
|
32
|
+
else
|
33
|
+
command = "xcodebuild #{defines} BUILD_DIR=#{build_dir} BUILD_LIBRARY_FOR_DISTRIBUTION=YES clean build -configuration #{configuration} -alltargets -destination '#{destination}' ARCHS='#{archs}' SKIP_INSTALL=#{skip_install} | xcpretty 2>&1"
|
34
|
+
end
|
11
35
|
UI.puts("XBuilder command:#{command}")
|
12
36
|
output = `#{command}`.lines.to_a
|
13
37
|
Dir.chdir pwd
|
@@ -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)
|
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
|
@@ -20,6 +20,7 @@ module Pod
|
|
20
20
|
@configuration = configuration
|
21
21
|
@outputs = Hash.new
|
22
22
|
@symbols = symbols
|
23
|
+
@support_maccatalyst = support_maccatalyst
|
23
24
|
end
|
24
25
|
|
25
26
|
def build
|
@@ -135,6 +136,9 @@ module Pod
|
|
135
136
|
|
136
137
|
def build_all_device defines
|
137
138
|
# build general first because simulator will exchange SDKROOT to simulat sdk
|
139
|
+
if @support_maccatalyst
|
140
|
+
build_MacCatalyst_device defines
|
141
|
+
end
|
138
142
|
build_general_device defines
|
139
143
|
build_simulator_device defines
|
140
144
|
end
|
@@ -154,7 +158,22 @@ module Pod
|
|
154
158
|
xcode_xbuild(
|
155
159
|
defines,
|
156
160
|
@configuration,
|
157
|
-
@sandbox_root
|
161
|
+
@sandbox_root,
|
162
|
+
'export',
|
163
|
+
'iOS Simulator'
|
164
|
+
)
|
165
|
+
end
|
166
|
+
|
167
|
+
def build_MacCatalyst_device defines
|
168
|
+
UI.puts("--- Building framework #{@spec} with MacCatalyst device")
|
169
|
+
xcode_xbuild(
|
170
|
+
defines,
|
171
|
+
@configuration,
|
172
|
+
@sandbox_root,
|
173
|
+
'export', # build_dir
|
174
|
+
'macOS', # platform
|
175
|
+
"#{@sandbox_root}/Pods.xcodeproj", # project
|
176
|
+
"#{@spec.name}" # scheme
|
158
177
|
)
|
159
178
|
end
|
160
179
|
|
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.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- humin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|