Reputation: 5964
My Flutter app used plugin flutter_braintree 4.0.0. It used to work (Xcode 15) - I loaded the update to the Test Flight. But I upgraded to Xcode 16. Now when I try to post an update to Test Flight I get an error:
PPRiskMagnes & CardinalMobile framework have bitcode
How can I fix this?
Upvotes: 2
Views: 698
Reputation: 5964
used a temporary solution - added to POD file
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
bitcode_strip_path = `xcrun --find bitcode_strip`.chop!
def strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
framework_path = File.join(Dir.pwd, framework_relative_path)
command = "#{bitcode_strip_path} #{framework_path} -r -o #{framework_path}"
puts "Stripping bitcode: #{command}"
system(command)
end
framework_paths = [
"Pods/Braintree/Frameworks/XCFrameworks/CardinalMobile.xcframework/ios-arm64_armv7/CardinalMobile.framework/CardinalMobile",
"Pods/Braintree/Frameworks/XCFrameworks/CardinalMobile.xcframework/ios-arm64_i386_x86_64-simulator/CardinalMobile.framework/CardinalMobile",
"Pods/Braintree/Frameworks/XCFrameworks/PPRiskMagnes.xcframework/ios-arm64/PPRiskMagnes.framework/PPRiskMagnes",
"Pods/Braintree/Frameworks/XCFrameworks/PPRiskMagnes.xcframework/ios-arm64_x86_64-simulator/PPRiskMagnes.framework/PPRiskMagnes"
]
framework_paths.each do |framework_relative_path|
strip_bitcode_from_framework(bitcode_strip_path, framework_relative_path)
end
end
Upvotes: 2
Reputation: 46
This known issue helped me, you need to strip the bitcode in your Podfile.
https://discuss.bitrise.io/t/xcode-16-known-issues/24484
Upvotes: 3