Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[expo-payments-stripe] Stripe pod does not compile on Xcode 11.4 #7621

Closed
mitchellbutler opened this issue Apr 2, 2020 · 23 comments · Fixed by #8594
Closed

[expo-payments-stripe] Stripe pod does not compile on Xcode 11.4 #7621

mitchellbutler opened this issue Apr 2, 2020 · 23 comments · Fixed by #8594

Comments

@mitchellbutler
Copy link

🐛 Bug Report

Environment

I've installed expo-payments-stripe on a bare React Native setup with react-native-unimodules set up and configured.

I encounter an error when building for iOS as outlined in this Stripe Issue: stripe/stripe-ios#1525

Steps to Reproduce

  1. Install the latest version of expo-payments-stripe (e.g., yarn add expo-payments-stripe)
  2. Navigate to the ios folder and run pod install - you'll notice that version 13.2.0 of the Stripe SDK pod is installed.
  3. Try to build the app (e.g., yarn start)

Expected Behavior

The project should build without any errors.

Actual Behavior

The project returns a compiler error as outlined in the Stripe issue I mentioned above:

Incompatible block pointer types sending '__strong STPAPIResponseBlock _Nonnull' (aka 'void (^__strong)(ResponseType _Nullable __strong, NSHTTPURLResponse * _Nullable __strong, NSError * _Nullable __strong)') to parameter of type 'void (^ _Nonnull)(STPSource * _Nullable __strong, NSHTTPURLResponse * _Nullable __strong, NSError * _Nullable __strong)'

Reproducible Demo

I'm going to skip this step because I feel it's unnecessary in this particular case. The issue is not with the project and does not need to be troubleshooted. It's simply relying on an outdated dependency that needs to be fixed.

It seems that the next supported version on Stripe is version 14.0.1 which is just one version removed from the current one. I've found Stripe's changelog for that update here.

I've also manually changed this line in the plugin to: s.dependency 'Stripe', '~> 14.0.1' and confirmed that the issue goes away.

Unfortunately I'm just getting started with the package and can't test whether this has broken any existing functionality yet. Ideally someone with more familiarity with the package could review the few items in the changelog and confirm that it's ok.

@eliasturbay
Copy link

Any ETA on this @sjchmiela ? Thx!

@sharadrb
Copy link

hi,
I am trying to use expo-payments-stripe as well and getting same issue. Can not even move forward. Any update on this issue?

Thanks,
Sharad

@Bojianye
Copy link

Any update on this issue?

@jSkrills
Copy link

I am also having this same issue

@bkniffler
Copy link

Would love to see some action for this, I've not been able to integrate stripe with expo, and the only reason for ejecting out of expo for me was to use tipsi-stripe directly.

@arjunlandes
Copy link

Agreed with @bkniffler. I converted to bare workflow just for payments and now my app doesn't even build.

@Bojianye
Copy link

Bojianye commented May 1, 2020

Work with Xcode 11.3.

@arjunlandes
Copy link

I think that didn't work because I have a new iPhone SE and I'm trying to run it on my phone.

@Bojianye
Copy link

Bojianye commented May 1, 2020

I think that didn't work because I have a new iPhone SE and I'm trying to run it on my phone.

Please make sure your Xcode version is not 11.4.x.

@arjunlandes
Copy link

Yeah, so 11.3.1 does allow me to build. Do we know when this issue will be resolved in 11.4+?

@arjunlandes
Copy link

And would we have this problem if we used tipsi-stripe directly?

@bkniffler
Copy link

@darkstar3057 Xcode 11.4.x works great with tipsi-stripe. I wished expo-payments-stripe had the same level of integration and quality as the rest of expo libraries, seems its being plagued with a few issues ATM.

I'd recommend to eject for now and just use tipsi. I'm saying this after having wasted a lot of time trying to get expo to work with stripe payments + native apple payments. I'm missing the easy publishing of expo though.

@99darwin
Copy link

I am running in the bare workflow, expo-payments-stripe doesn't work. I get the undefined is not an object StripeModule.init error, the Xcode error mentioned here... I tried tipsi-stripe but that doesn't work either. This is a massive problem and a game-breaking issue. The expo team should take this seriously, IMO. The docs are out of date if you're using even a pseudo-recent version of React Navigation (componentDidMount and componentWillMount are not an option). This feature is a vital part of our app and we're looking at a refactor to remove Expo with a deadline approaching.

@jSkrills
Copy link

^ Same. Still very stuck by this. Would love some signs of life on this issue it's been radio silence for a long time.

@sjchmiela
Copy link
Contributor

Hey all! 👋

I'm really sorry for all the misunderstanding, the delay and the troubles caused by our silence. 😞 It has been caused by putting too much on our plates at the same time, making us have to delay some of our tasks for later. I'm sorry that such a crucial feature for some of you like expo-payments-stripe has been affected by this.

Due to the fact that we've been having troubles maintaining so many libraries (and maintaining a library so it's as good as we want our packages to be takes some time, believe me) and since most of the problems we wanted to solve with this library have been resolved in React Native itself (eg. autolinking) with weighty hard, but we feel we should deprecate expo-payments-stripe and direct you to tipsi-stripe instead.

tipsi-stripe is the library we've based expo-payments-stripe on, so the API shouldn't be any different and with recent contributions we believe it should help you achieve your goals better than our low-maintained package.

Given you're on a more recent version of React Native, moving to tipsi-stripe should be as easy as:

  • yarn remove expo-payments-stripe (or npm uninstall expo-payments-stripe)
  • yarn add tipsi-stripe (or add it to dependencies and reinstall deps)
  • replace any imports from expo-payments-stripe with tipsi-stripe
    import { PaymentsStripe as Stripe } from 'expo-payments-stripe';
    // to
    import Stripe from 'tipsi-stripe';
  • Expo adds an Async suffix to all the asynchronous methods, which Tipsi-Stripe does not, so you'll need to replace a bunch of methods like .openApplePaySetupAsync() with .openApplePaySetup()
  • you can remove a part of AndroidManifest.xml you've added when following these steps and replace them following this guide if you intend to use sources.

I'm really sorry for disappointing you. I will try to fix this issue and release an updated version of expo-payments-stripe to unblock you, but I can't promise we will deliver any major updates in the near future.

If you have any questions or I can help you, let me know!

🙂

@sharadrb
Copy link

This is our experience so far. We recently ejected expo to integrate with expo-payments-stripe which didn't work. Then tried with tipsi-stripe. Tipsi-stripe didn't work as well because it is relying on some of very old components from 2017. Since we could not downgrade, tipsi-stripe didn't work, specially for Google pay.

We end up integrating Stripe official native components using custom react native bridging... Very painful process and we spend months just to figure out that expo-payments-stripe and tipsi-stripe does not work with latest frameworks...

@99darwin
Copy link

Just a heads up to anyone who stumbles across this. If you're using XCode 11.4.1, you'll need to use the latest beta version of tipsi-stripe. You can see their changelog here. You'll want to follow their instructions for upgrading your package.json and Podfile. I can confirm it compiles after following those steps.

Good luck!

@bkniffler
Copy link

Thanks @sjchmiela for the feedback. I feel like any form of prioritization is good, even if it means it will leave some people disappointed, its probably the best for most people. Still, if expo wants to sell services, allowing their customers to have payments within the easier flows might be helpful! :)

Hope you'll update us here if anything ever changes on this matter.

@99darwin I can confirm it works that way, great info!

@jSkrills
Copy link

I chose to use expo-payments-stripe over tipsi-stripe specifically bc the Google Pay checklists and things the docs tell you you have to go through to use it seemed like an excessive amount of work. It seemed expo-payments-stripe had handled some of that hassle for me.

@sjchmiela, just to be clear you are still going to try and resolve this correct? I don't need to choose a different path yet? I am really only using google pay and apple pay, I'd prefer to use the simplest approach possible to provide those features. If this issues is going to be resolved still it doesn't really bother me that there won't be any major updates coming soon.

@fbartho
Copy link

fbartho commented May 20, 2020

@sharadrb -- As one of the contributors that helped make the tipsi-stripe beta, I can assure you that we've been shipping the Beta in Production since September 2019. I'm happy to discuss why it's still a beta outside of this ticket.

For anybody that comes along, the Beta is the #experimental branch of the tipsi-stripe repo.

@jSkrills
Copy link

@sjchmiela thoughts on my comment to you above?

sjchmiela added a commit that referenced this issue Jun 1, 2020
…mpat (#8594)

# Why

- Fixes #7621.
- Stripe 13 is incompatible with Xcode 11.4.
- We've been slow to update the package.

# How

- Updated the dependency version to `~> 14.0.1` fixing the issue as per stripe/stripe-ios#1525 (comment). The 13 ➡️ 14 upgrade should not break anything, I have verified that we don't use any of the changed classes described [in changelog](https://github.com/stripe/stripe-ios/blob/master/CHANGELOG.md#1400-2018-11-14).
- Added the ability to set a completely custom version of Stripe in order to let people upgrade to newer versions without using `patch-package` etc. We already do this in eg. `expo-image`.

# Test Plan

Temporarily I have removed the `expo-payments-stripe` package from the list of `excludedUnimodules` in `bare-expo`. I have verified that after applying these changes the application runs successfully.
@sjchmiela
Copy link
Contributor

Hey all, I just published expo-payments-stripe@8.2.2 which includes Stripe at ~> 14.0.1 by default — this should get rid of that nasty problem. Thank you for your patience!

@jSkrills
Copy link

I can confirm this, it's even working with xcode 11.5. Thanks so much for your time on this @sjchmiela

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.