question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

undefined-symbols-for-architecture-x86_64-on-ios after adding Stripe React Native

See original GitHub issue

Describe the bug I am getting the following error when I run the app in Release mode. undefined-symbols-for-architecture-x86_64-on-ios

That error is documented here but it only fixes the issue in the Debug scheme, not in the Release scheme.

That same fix is also documented here but also fix the issue in the Debug scheme, not the Release scheme.

To Reproduce Steps to reproduce the behavior:

  1. Install a new React Native app
  2. Add Stripe as instructed in the Getting started documentation
  3. Open your project via Xcode, go to project -> build settings, find library search paths and remove all swift related entries such as: $(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME) and $(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME).
  4. Create a new Swift file to the project (File > New > File > Swift), give it any name (e.g. Fix.swift), and create a bridging header when prompted by Xcode.
  5. Run the app in Debug scheme (From your XCode, go to Product > Scheme > Edit Scheme) and choose Run on the left and select Debug in the right pane, do the same for Test
  6. Run the app
  7. The app will build successfully
  8. Repeat step 5 but change Debug to Release then run the app, Build will fail with error undefined-symbols-for-architecture-x86_64-on-ios

Expected behavior The app should build successfully in the Release scheme just like how it is building successfully in the Debug Scheme.

Screenshots Screen Shot 2021-09-20 at 8 00 28 AM

Smartphone (please complete the following information):

  • Device: iPhone 11 Pro Max Simulator
  • OS: 14.5

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15

github_iconTop GitHub Comments

3reactions
insteptechcommented, Dec 29, 2021

same issue:

need help

Screenshot 2021-12-29 at 1 01 18 PM
1reaction
michaelbaydaycommented, Oct 5, 2021
❌  Undefined symbols for architecture x86_64
> Symbol: _OBJC_CLASS_$_RCTEventEmitter
> Referenced from: type metadata for stripe_react_native.StripeSdk in StripeSdk-a3ebf5d1e464abf21f2a5d95fac11bff897a445930bcdef1f62aed67246f0d19.o
Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native SDK
The Stripe React Native SDK allows you to build payments into your native Android and iOS apps using React Native. We provide powerful...
Read more >
Getting started & Installation fails · Issue #7 · stripe ...
Android builds but adding import {StripeProvider} from 'react-native-stripe-sdk'; breaks the project. RN isn't giving me an error anymore, I just get a white ......
Read more >
React Native: Accepting payments with Stripe in your app ...
Stripe's React Native SDK provides a convenient API for allow developers to accept payments natively in their applications in a performant ...
Read more >
Add Stripe to a React Native application - YouTube
In this episode, you'll learn how to add Stripe to an Expo based React Native application. ### Table of contents 00:00 Introduction01:08 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found