skip to Main Content

I am new in react-native development. How we can get package name in react-native. Does anyone have any ideas?

2

Answers


  1. Hey you can use the package device info https://www.npmjs.com/package/react-native-device-info

    and use it like this , its a pretty well maintained library

      DeviceInfo.getInstallerPackageName().then((installerPackageName) => {
          // Play Store: "com.android.vending"
          // Amazon: "com.amazon.venezia"
          // Samsung App Store: "com.sec.android.app.samsungapps"
          // iOS: "AppStore", "TestFlight", "Other"
        });
    

    Or you can check this library for package name rn-check

    console.log(VersionCheck.getPackageName());        // com.reactnative.app
    console.log(VersionCheck.getCurrentBuildNumber()); // 10
    console.log(VersionCheck.getCurrentVersion());     // 0.1.1
    
    Login or Signup to reply.
  2. You can do it with simple lib Version Check

    Just run VersionCheck.getPackageName()

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search