braintree / braintree_ios

Braintree SDK for iOS
https://developer.paypal.com/braintree/docs/start/hello-client/ios/v5
MIT License
560 stars 294 forks source link

Cannot build for x86-64 iOS Simulator. arm64 error with PPRiskMagnes.MagnesSDK. #707

Closed anutting closed 3 years ago

anutting commented 3 years ago

Integration Details (please complete the following information):

Describe the bug Description of what the bug is. Please include as many details as possible.

Build is failing:

Pods/Braintree/Frameworks/PPRiskMagnes.xcframework/ios-arm64/PPRiskMagnes.framework/PPRiskMagnes, building for iOS Simulator-x86_64 but attempting to link with file built for iOS-arm64 Undefined symbols for architecture x8664: "type metadata accessor for PPRiskMagnes.MagnesSDK", referenced from: static Braintree.PPDataCollector.generateClientMetadataID(: Swift.String?, disableBeacon: Swift.Bool, data: [Swift.String : Swift.String]?) -> Swift.String in PPDataCollector.o "dispatch thunk of static PPRiskMagnes.MagnesSDK.shared() -> PPRiskMagnes.MagnesSDK", referenced from: static Braintree.PPDataCollector.generateClientMetadataID(: Swift.String?, disableBeacon: Swift.Bool, data: [Swift.String : Swift.String]?) -> Swift.String in PPDataCollector.o "dispatch thunk of PPRiskMagnes.MagnesSDK.setUp(setEnviroment: PPRiskMagnes.MagnesSDK.Environment, setOptionalAppGuid: Swift.String, setOptionalAPNToken: Swift.String, disableRemoteConfiguration: Swift.Bool, disableBeacon: Swift.Bool, magnesSource: PPRiskMagnes.MagnesSDK.MagnesSource) throws -> ()", referenced from: static Braintree.PPDataCollector.generateClientMetadataID(: Swift.String?, disableBeacon: Swift.Bool, data: [Swift.String : Swift.String]?) -> Swift.String in PPDataCollector.o "dispatch thunk of PPRiskMagnes.MagnesSDK.collectAndSubmit(withPayPalClientMetadataId: Swift.String, withAdditionalData: [Swift.String : Swift.String]) throws -> PPRiskMagnes.MagnesResult", referenced from: static Braintree.PPDataCollector.generateClientMetadataID(: Swift.String?, disableBeacon: Swift.Bool, data: [Swift.String : Swift.String]?) -> Swift.String in PPDataCollector.o "dispatch thunk of PPRiskMagnes.MagnesResult.getPayPalClientMetaDataId() -> Swift.String", referenced from: static Braintree.PPDataCollector.generateClientMetadataID(: Swift.String?, disableBeacon: Swift.Bool, data: [Swift.String : Swift.String]?) -> Swift.String in PPDataCollector.o ld: symbol(s) not found for architecture x86_64

To Reproduce Steps to reproduce the behavior:

  1. Add Pod 'Braintree' to Podfile
  2. pod install
  3. build for simulator

Expected behavior Expected a successful build

This is a react native project so I'm not really versed in iOS build stuff. arm64 is set as an excluded arch in my build settings but apparently there's some file still being built for arm64.

sarahkoop commented 3 years ago

Hi @anutting - We do not officially support React Native, but we have tested and are able to successfully run pod install and build a React Native app with Braintree iOS version 5.4.2. I was not able to reproduce this issue. If you are not using the latest version, we would suggest upgrading. We would also be happy to review a PR if you discover a fix for this issue.

anutting commented 3 years ago

The React Native part isn't really relevant. The MagnesSDK is not looking at the EXCLUDED_ARCHS setting that I have set up in Xcode. config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"

scannillo commented 3 years ago

👋 Hello @anutting - are you on an M1 or Intel Mac?

gbkwiatt commented 3 years ago

Having same issue on M1 Mac Mini, works fine on Intel machines

scannillo commented 3 years ago

Currently, we can only support the Rosetta workaround on M1 machines. For me so far, using Rosetta on the M1 mac has been working fine with CocoaPods and I am able to run on a simulator OK.

We are still blocked on adding full support for the M1, see this issue. Also, this issue will be updated once we can remove the EXCLUDED_ARCHS from the Podspec. I am going to close this issue in favor of tracking in the two I just linked.

vishaldhanotiyadev commented 1 year ago

is any updated on this issue? I am still facing this issue in react native brain tree drop ui integration.

scannillo commented 1 year ago

@vishaldhanotiyapersistent - please open an issue in our DropIn repo including steps to replicate and specifics on your machine and integration.