BlackBoxVision / react-native-mercadopago-px

🚀 MercadoPago PX bridge for react-native
https://react-native-mercadopago-px.blackbox-vision.tech
MIT License
104 stars 25 forks source link

[Feature] - Add support for Expo Config Plugins #45

Open JonatanSalas opened 3 years ago

JonatanSalas commented 3 years ago

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.

teovillanueva commented 3 years ago

This would be awesome ✨

JonatanSalas commented 2 years ago

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.

SrBrahma commented 2 years ago

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!

JonatanSalas commented 2 years ago

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.

SrBrahma commented 2 years ago

I appreciate the quick answer, thanks!

Waiting for it, seems promising! 😊

gastonbritomulesoft commented 2 years ago

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!!!

SrBrahma commented 2 years ago

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

JonatanSalas commented 2 years ago

@SrBrahma I haven't tested this.

maumar2000 commented 2 years ago

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

glorio-loopstudio commented 2 years ago

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

anderCM commented 1 year ago

@gastonbritomulesoft could you fix it?

JonatanSalas commented 1 year ago

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.

SebastianLabadie commented 1 year ago

Hay algun update del proyecto?

BarraR3port commented 6 months ago

Alguna novedad sobre esto?