Skip to content

Commit 48988aa

Browse files
committed
strip bitcode
1 parent 4e2db85 commit 48988aa

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

App/ios/Podfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,29 @@ target 'Inventory' do
8787
end
8888
end
8989
end
90+
91+
bitcode_strip_path = `xcrun --find bitcode_strip`.chop!
92+
93+
def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
94+
framework_path = File.join(Dir.pwd, framework_relative_path)
95+
command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
96+
puts "Stripping bitcode: #{command}"
97+
system(command)
98+
end
99+
100+
framework_paths = [
101+
"Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_armv7/OpenSSL.framework/OpenSSL",
102+
"Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_i386_x86_64-simulator/OpenSSL.framework/OpenSSL",
103+
"Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/ios-arm64_x86_64-maccatalyst/OpenSSL.framework/OpenSSL",
104+
"Pods/OpenSSL-Universal/Frameworks/OpenSSL.xcframework/macos-arm64_x86_64/OpenSSL.framework/OpenSSL",
105+
"Pods/hermes-engine/destroot/Library/Frameworks/macosx/hermes.framework/hermes",
106+
"Pods/hermes-engine/destroot/Library/Frameworks/macosx/hermes.framework/Versions/Current/hermes",
107+
"Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64/hermes.framework/hermes",
108+
"Pods/hermes-engine/destroot/Library/Frameworks/universal/hermes.xcframework/ios-arm64_x86_64-maccatalyst/hermes.framework/hermes",
109+
]
110+
111+
framework_paths.each do |framework_relative_path|
112+
strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
113+
end
90114
end
91115
end

0 commit comments

Comments
 (0)