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 #1420

Open
asadmalik210 opened this issue Sep 24, 2024 · 5 comments
Open

CardinalMobile.framework contains BitCode #1420

asadmalik210 opened this issue Sep 24, 2024 · 5 comments

Comments

@asadmalik210
Copy link

Braintree SDK Version

Latest

Environment

Sandbox

Xcode Version

XCode 16

OS Version & Device

iOS 18

Integration type

CocoaPods

Development Processor

Intel

Describe the bug

The problem is that when I try to upload an app with braintree installed, it doesn't proceed saying it has bit code, like it uses CardinalMobile.framwork that contains bitcode, which is not supported in Xcode 16 onwards

To reproduce

Upload the app in latest xcode 16

Expected behavior

Doesn't let the app upload

Screenshots

No response

@FetFrumos
Copy link

FetFrumos commented Sep 24, 2024

Hame same issue, I used xcode 16. I can't published new version app in AppStore.

@jaxdesmarais
Copy link
Contributor

Hello -

Are you able to share a screenshot of the error you are seeing when trying to upload your app?

Running the following commands on SDK version 6.23.3 within Frameworks/XCFrameworks/CardinalMobile.xcframework/ios-arm64/CardinalMobile.framework and Frameworks/XCFrameworks/CardinalMobile.xcframework/ios-arm64_x86_64-simulator/CardinalMobile.framework is returning no results indicating bitcode is not enabled for the Cardinal framework:

otool -l CardinalMobile | grep bitcode
otool -l CardinalMobile | grep __LLVM

@FetFrumos
Copy link

image
@jaxdesmarais - my screen with errror

@FetFrumos
Copy link

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

@jaxdesmarais
Copy link
Contributor

Hey @FetFrumos -

Are you able to confirm that Runner.app has been updated to the latest SDK version? You may also try running pod deintegrate and pod install to ensure it's pulling in the latest Braintree SDK version.

As mentioned I've confirmed via the command line that neither package has bitcode enabled. Additionally I uploaded a new cocoapods project using version 6.23.3 and am not running into this issue. If you are still running into issues after checking the Braintree SDK version in your app, please send over a small sample project reproducing the error and we would be happy to take a look.

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

3 participants