App crashing when using discoverReaders method.
Describe the bug My native app is crashing when i am calling discoverReaders method.
To Reproduce Steps to reproduce the behavior:
const {error} = await discoverReaders({ discoveryMethod: 'localMobile', });
Expected behavior it should either give some error or in success callback
Screenshots If applicable, add screenshots to help explain your problem.
Stripe Terminal React Native SDK version
- "@stripe/stripe-terminal-react-native": "^0.0.1-beta.19",
Smartphone (please complete the following information):
- Browser Chrome
Additional context Add any other context about the problem here.
Stripe Terminal is not supported in browser. The provider should not be embedded at all on Web (we did this by wrapping it in our own context with conditional rendering)
@nabilfreeman i am checking in xcode simulator not on web browser.
Im getting the same issue on IOS. Im using the function:
const { error } = await discoverReaders({
discoveryMethod: 'bluetoothScan',
})
and it completely crashes my application
@ankitharitus @DaviddStewarttCT the discoverReaders() method doesn't work on simulator, unless you pass in the simulated: true flag
@ankitharitus are you still running into issues with discovery?
@ankitharitus, @nazli-stripe It was also happening with me (trying to integrate with Stripe M2 Reader). I was using ^0.0.1-beta.20 with iOS 17.6.1. Other options like "localMobile" worked correctly.
The problem was related to bluetooth-central permissions in Info.plist.
After adding it, it started working.