Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CardinalMobile.framework contains BitCode(Xcode 16) - can't publishing update to AppStore/Test Flight #174

Open
FetFrumos opened this issue Sep 24, 2024 · 1 comment

Comments

@FetFrumos
Copy link

FetFrumos commented Sep 24, 2024

My Flutter app used plugin flutter_braintree 4.0.0. It used to work - I loaded the update to the Test Flight. But I upgraded to Xcode 16.
Now when I try to post an update to TF I get an error:

PPRiskMagnes & CardinalMobile framework have bitcode

How can I fix this? any advice - urgently need to send an update

Cardinal2

@FetFrumos
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant