I am trying to do sms verification through react native where an OTP will be sent to a provided number. It worked when I was doing it normally in react native following this example react-native-sms-android - npm but in expo project its not working. Though the package only works for android , I want a solution which will work for both android and ios.
That library isn’t working because it requires you to make native code changes which isn’t available in a standard CRNA project. You would have to eject which will then create the ios/android directories where you can make said native code changes.
I haven’t used it personally but it looks like this may be a viable option in which you wouldn’t have to eject.
As far as i know you cant auto read SMS on iphone . We have used react-native-android-sms-listener to implement otp auto read . we have detached from expo . you will also need to acquire the permissions for SMS . https://developer.android.com/guide/topics/permissions/index.html . Refer to
https://github.com/expo/expo/issues/784 for expo and android permissions .
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.