react-native-mercadopago-px icon indicating copy to clipboard operation
react-native-mercadopago-px copied to clipboard

[Feature] - Add support for Expo Config Plugins

Open JonatanSalas opened this issue 3 years ago • 14 comments

Motivation

Our main goal is to provide the Best DX for using our library, currently iOS side is the most difficult part to config, where you need to run a set of steps in order to build and get our library properly configured.

The idea is to implement Expo Config Plugins to support those using Expo with a better DX, the counterpart of this is that only projects using SDK >= 41 will be able to get auto config. Those projects using SDK < 41 will have to eject if they are managed or start via bare-workflow.

JonatanSalas avatar Jun 18 '21 14:06 JonatanSalas

This would be awesome ✨

teovillanueva avatar Jul 15 '21 21:07 teovillanueva

Yes! also we'll be working on making this feature to work for react-native CLI projects too. Our idea is to bring the best DX we can.

JonatanSalas avatar Jul 19 '21 14:07 JonatanSalas

Awesome! Any news about it? I am starting a new app that will very likely use Mercado Pago here in Brazil. As I am using latest version of Expo, I see no problem with this version limitation.

Also, could you answer a few more questions, please?

It's already usable in managed workflow with those iOS configs specified in the docs, without ejecting?

Does it support PT-br language in Android? In docs it says it's iOS only but as it seemed strange to me I thought it was better to be sure and ask here.

Many thanks!

SrBrahma avatar Aug 06 '21 20:08 SrBrahma

Hi @SrBrahma! We haven't implemented this yet and we've it in backlog:

  1. We haven't tested the new managed workflow with those iOS config, but I think that it could work.
  2. In Android we haven't implemented yet language support but its in the works with a few more features.

I'm going to update the project board as soon as I can so it reflects the current state of development for this library.

JonatanSalas avatar Aug 06 '21 20:08 JonatanSalas

I appreciate the quick answer, thanks!

Waiting for it, seems promising! 😊

SrBrahma avatar Aug 06 '21 20:08 SrBrahma

Great feature!! Thank you @JonatanSalas!!

I'm trying to use this library in an Expo managed app + Android application (iOS is not needed so far). Is that possible with a managed Expo app?

I tried to use it but it throws: [Unhandled promise rejection: TypeError: null is not an object (evaluating '_reactNative.NativeModules.ReactNativeMercadopagoPx.createPayment')] at node_modules/@blackbox-vision/react-native-mercadopago-px/src/index.tsx:6:17 in RNMercadoPagoPx.createPayment at node_modules/@blackbox-vision/react-native-mercadopago-px/src/index.tsx:6:17 in RNMercadoPagoPx.createPayment at [native code]:null in flushedQueue at [native code]:null in callFunctionReturnFlushedQueue

when I call: const payment = await MercadoPagoCheckout.createPayment({ preferenceId: preference.data.id, publicKey: CONSTANTS.mercadopago.publicKey });

I'm using SDK v41.0.0, Expo 4.7.3 and react-native: ~0.63.4",

Any help will be very appreciated. Best!!!

gastonbritomulesoft avatar Sep 06 '21 01:09 gastonbritomulesoft

@JonatanSalas Do you know if it currently supports EAS build?

SrBrahma avatar Oct 26 '21 05:10 SrBrahma

@SrBrahma I haven't tested this.

JonatanSalas avatar Oct 26 '21 10:10 JonatanSalas

@JonatanSalas Estoy usando la version de expo "expo": "~43.0.0", que debo hacer para integrar esta librería?

maumar2000 avatar Jan 11 '22 19:01 maumar2000

I am using Expo 41 ejected but I can't install this library yet. Any help??

glorio-loopstudio avatar Feb 04 '22 20:02 glorio-loopstudio

@gastonbritomulesoft could you fix it?

anderCM avatar Nov 24 '22 13:11 anderCM

If you use Expo with prebuild and push the android and ios folder eas build will work properly. We haven't done any advance yet in the expo config plugin, we've the intention to release it by the first Q of 2023.

JonatanSalas avatar Nov 24 '22 14:11 JonatanSalas

Hay algun update del proyecto?

SebastianLabadie avatar Apr 28 '23 13:04 SebastianLabadie

Alguna novedad sobre esto?

BarraR3port avatar Dec 26 '23 04:12 BarraR3port