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 Linking problems #276

Open Marcoo09 opened 3 years ago

Marcoo09 commented 3 years ago

Hi!

I was trying to setup this library and I'm having some problems on Ios:

image

I tried adding on Link Binary with Libraries the file libswiftwebkit:

image

But I continue having one error and I cannot fix that:

image

Thanks in advance

eqlion commented 3 years ago

I have the same issue: RN 0.63.4

I added File.swift and Bridging Header, as shown here: https://github.com/facebook/react-native-fbsdk/issues/755#issuecomment-634101710

Now I get the same as your second error:

Showing Recent Messages
Undefined symbol: _swift_getOpaqueTypeConformance

Showing Recent Messages
Undefined symbol: (extension in Foundation):__C.NSScanner.scanUpToString(Swift.String) -> Swift.String?
markwillis82 commented 3 years ago

I also had this error and managed to compile by removed the Stripe/Braintree dependencies (we didn't need them anyway)

  s.dependency 'React'
#   s.dependency 'Stripe'
#   s.dependency 'Braintree'

I currently can't find a way to remove these in the main Podilfe and can only do it bt manually updating the podspec in node_modules

nmilcoff commented 3 years ago

I'm also getting this error, and commenting out Stripe/Braintree in the podfile make the errors go away, but it's a rather inconvenient way to deal with the issue. Did anyone get around this in a different way?

nmilcoff commented 3 years ago

I have the same issue: RN 0.63.4

I added File.swift and Bridging Header, as shown here: facebook/react-native-fbsdk#755 (comment)

Now I get the same as your second error:

Showing Recent Messages
Undefined symbol: _swift_getOpaqueTypeConformance

Showing Recent Messages
Undefined symbol: (extension in Foundation):__C.NSScanner.scanUpToString(Swift.String) -> Swift.String?

After making this change, I was able to get rid of the remaining error by applying this workaround, which I saw recommended here. I hope it helps!

GFean commented 3 years ago

running react-native link react-native-payments and cd ios && pod install did the trick in my case