naoufal / react-native-payments

Accept Payments with Apple Pay and Android Pay using the Payment Request API.
https://www.npmjs.com/package/react-native-payments
1.59k stars 413 forks source link

iOS: CopySwiftLibs error when running on simulator #273

Open estebanr92 opened 3 years ago

estebanr92 commented 3 years ago

Good day. After following all installation instructions, I'm getting the following error:

The following build commands failed: CopySwiftLibs /Users/myuser/Library/Developer/Xcode/DerivedData/appName-fjphtcfflymrvrcqpcmxblhrztjx/Build/Products/Debug-iphonesimulator/appName.app

More Details: error: Build input file cannot be found: '/Users/myuser/Library/Developer/Xcode/DerivedData/appName-fjphtcfflymrvrcqpcmxblhrztjx/Build/Products/Debug-iphonesimulator/appName.app/appName' (in target 'appName' from project 'appName')

I found that removing "arm64" from excluded architectures on Project - Build Settings might fix this issue, but after doing so I'm getting the following error:

The following build commands failed: Ld /Users/myuser/Library/Developer/Xcode/DerivedData/appName-fjphtcfflymrvrcqpcmxblhrztjx/Build/Products/Debug-iphonesimulator/appName.app/appName normal x86_64

ld: library not found for -lBraintree

Xcode version: 11.5 React-native-payments: 0.8.2 and tried with 0.8.3 React Native version: 0.62.2 Node version: 12.16.3

Thanks in advance.

Roopal78 commented 3 years ago

Same Issue when i run my app on real device, any solution work @estebanr92 ?

estebanr92 commented 3 years ago

@Roopal78 Hello, I forked the repo and completely removed the usage of Braintree (and every reference), after this everything works. Also I dont know if this might help you but, after some research I found that the Build settings of Braintree Pod (check Pods project in Xcode) had a Excluded Archs property that none other Pod had, I changed that but still It did not work. Hope this helps

Roopal78 commented 3 years ago

I Solved this error by testing this on the Real iOS device, here are the details of the versions I have used: "react-native-payments": "^0.8.1",
"react-native": "0.63.4", in package.json file, In podfile.lock I have these Version in the for Pods