tipsi-stripe icon indicating copy to clipboard operation
tipsi-stripe copied to clipboard

Build failed on iOS Undefined symbol: _swift_getOpaqueTypeConformance

Open jp928 opened this issue 3 years ago • 10 comments

The problem

Build failed

Environment

  • tipsi-stripe version: 9.0.0
  • Last tipsi-stripe version where the issue was not reproduced (if applicable):
  • iOS or Android: iOS
  • OS version: MacOS
  • React-Native version: 0.64

Undefined symbol: _swift_getOpaqueTypeConformance

If remove library_search_path, like mentioned here: https://github.com/react-native-community/upgrade-support/issues/62

then react-native-linear-gradient failed in build.

Library not found for -lBVLinearGradient

jp928 avatar Mar 25 '21 11:03 jp928

I'm getting this error too. Using Xcode 12.4, with ReactNative 0.63.4, and tipsi-stripe: ^9.0.0 App built fine before. But immediately after yarn add tipsi-stripe and pod install I start getting these build errors.

Jpoliachik avatar Mar 27 '21 22:03 Jpoliachik

I think the root issue is related to Stripe's recent iOS SDK 21.x update, and their switch to Swift. See https://stripe.com/docs/mobile/ios/sdk-21-migration

I got my build working as a workaround by downgrading tipsi-stripe to 8.0.2, and I also had to explicitly install Stripe pod 'Stripe', '19.0.1' in my Podfile, otherwise tipsi-stripe would include the latest Stripe version, which we don't want.

Jpoliachik avatar Mar 27 '21 22:03 Jpoliachik

@Jpoliachik Thanks for sharing your solution. It is most likely the solution by far.

jp928 avatar Mar 30 '21 05:03 jp928

@Jpoliachik Thanks. I tried yarn add tipsi-stripe 8.0.2 and cd ios & pod install (Stripe 19.4.0), which also builds successfully.

zztczcx avatar Apr 17 '21 08:04 zztczcx

I managed to make it work by removing "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)" line from LIBRARY_SEARCH_PATHS in project.pbxproj file, as mentioned here: https://github.com/react-native-community/upgrade-support/issues/62

andrea-provenzale avatar Apr 21 '21 16:04 andrea-provenzale

So no way to tipsi-stripe 9.0.0 with Stripe 21.4.0 except downgrading??

teamseamive avatar Apr 24 '21 14:04 teamseamive

Only removing "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)" this does not solve the problem.

I had to do the following to resolve the issue completely

Removed all entries from LIBRARY_SEARCH_PATHS in the Project configuration Add a new Swift file to the project (File > New > File > Swift), and call it whatever you want

zhahaoyu avatar May 18 '21 07:05 zhahaoyu

I'm on tipsi-stripe 9.0.0 with Stripe 21.6.0 but still experience building errors on XCode. I will try to downgrade UPDATE. Doing this works

Removed all entries from LIBRARY_SEARCH_PATHS in the Project configuration
Add a new Swift file to the project (File > New > File > Swift), and call it whatever you want

babyrusa avatar Jul 07 '21 01:07 babyrusa

same +1 :(((

minh-dai avatar Jul 15 '21 17:07 minh-dai

Same from me

emernuness avatar Jan 11 '22 11:01 emernuness

error build: Undefined symbol: _swift_getOpaqueTypeConformance

bonnmh avatar Jan 17 '23 16:01 bonnmh

Closing this ticket, so that new users don't think this project is still active.

Stripe does not want you using this, and you will find pain if you do; Please migrate to the official @stripe/stripe-react-native package, for your user's safety, and your developer's sanity!

See more:

  • https://github.com/tipsi/tipsi-stripe/issues/779
  • https://github.com/tipsi/tipsi-stripe/issues/842

fbartho avatar Jun 20 '23 20:06 fbartho