react-native-mercadopago-px
react-native-mercadopago-px copied to clipboard
[Feature] - Add support for Expo Config Plugins
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.
This would be awesome ✨
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.
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!
Hi @SrBrahma! We haven't implemented this yet and we've it in backlog:
- We haven't tested the new managed workflow with those iOS config, but I think that it could work.
- 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.
I appreciate the quick answer, thanks!
Waiting for it, seems promising! 😊
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!!!
@JonatanSalas Do you know if it currently supports EAS build?
@SrBrahma I haven't tested this.
@JonatanSalas Estoy usando la version de expo "expo": "~43.0.0"
, que debo hacer para integrar esta librerÃa?
I am using Expo 41 ejected but I can't install this library yet. Any help??
@gastonbritomulesoft could you fix it?
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.
Hay algun update del proyecto?
Alguna novedad sobre esto?