Open jfreitas-dev opened 4 months ago
Please, add the code sample
Will be helpful to add the video example
RN Code sample:
import RNBraintree from '@ekreative/react-native-braintree';
import { TouchableOpacity } from 'react-native';
<TouchableOpacity
key="cart-payment-apple-pay"
onPress={() => {
RNBraintree.runApplePay({
amount: `${CentsToDollars(summaryData.adjustedTotal)}`,
clientToken: config.APPLE_PAY_CLIENT_TOKEN,
companyName: config.APPLE_PAY_COMPANY_NAME,
currencyCode: 'USD',
})
.then(response => {
{...}
})
.catch((e: Error) => {
{...}
});
}}>
{...}
</TouchableOpacity>
Video: (Had to zip as it was too large) RPReplay_Final1718297966.mov.zip RPReplay_Final1718297966.mov.zip
Thanks for sharing code and video.
Could you attach the Podfile.lock file?
Here is the podfile:
Thanks for investigating the issue. I reproduced it. Unfortunately, I can't give you an ETA. Feel free to open PR with the fix.
Is there an existing issue for this?
What happened?
Configured project on a React Native App (not expo). Working well processing payments. During testing found that opening the Apple Pay prompt then navigating away from our app (switching apps or just going to the home screen) causes the app to crash.
Versions: "@ekreative/react-native-braintree": "^2.5.0" "react": "18.2.0" "react-native": "0.72.4"
Stack trace: Crashed: com.apple.main-thread 0 lousrnRelease 0x4d19ac -[RNBraintreeApplePay paymentAuthorizationViewControllerDidFinish:] + 114 (RNBraintreeApplePay.m:114) 1 PassKitUI 0x9f8ee4 __81-[PKPaymentAuthorizationViewController paymentAuthorizationCoordinatorDidFinish:]_block_invoke + 56 2 libdispatch.dylib 0x213c _dispatch_call_block_and_release + 32 3 libdispatch.dylib 0x3dd4 _dispatch_client_callout + 20 4 libdispatch.dylib 0x125a4 _dispatch_main_queue_drain + 988 5 libdispatch.dylib 0x121b8 _dispatch_main_queue_callback_4CF + 44 6 CoreFoundation 0x56710 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 16 7 CoreFoundation 0x53914 __CFRunLoopRun + 1996 8 CoreFoundation 0x52cd8 CFRunLoopRunSpecific + 608 9 GraphicsServices 0x11a8 GSEventRunModal + 164 10 UIKitCore 0x40a90c -[UIApplication _run] + 888 11 UIKitCore 0x4be9d0 UIApplicationMain + 340 12 redacted 0xaaa0 main + 8 (main.m:8) 13 ??? 0x1b95dde4c (Missing)
Record