Tipsi-stripe: Build failed on iOS Undefined symbol: _swift_getOpaqueTypeConformance

Created on 25 Mar 2021  路  9Comments  路  Source: tipsi/tipsi-stripe

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

Most helpful comment

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

All 9 comments

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.

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.

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

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

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

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

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

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

same +1 :(((

Was this page helpful?
0 / 5 - 0 ratings