faizalshap / react-native-otp-verify

React native sms verification without additional permissions
MIT License
239 stars 92 forks source link

on manual link how to add this #87

Closed hassanharoon321 closed 4 months ago

hassanharoon321 commented 1 year ago

Add new OtpVerifyPackage() to the list returned by the getPackages() method

mo-nizar commented 1 year ago

go to app/src/main/java/.../MainApplication.java scroll down and find getPackages() method

it looks something like this:

protected List getPackages() {

  // Default React Native Packages

  List<ReactPackage> reactPackageList = new ArrayList<>(Arrays.asList(
  ....
  ....

after:

protected List getPackages() {

    // Default React Native Packages

    List<ReactPackage> reactPackageList = new ArrayList<>(Arrays.asList(
         new OtpVerifyPackage()

dont miss to add this import on top of the same file:

import com.faizal.OtpVerify.OtpVerifyPackage;