{"id":45587942,"url":"https://github.com/appupgrade-dev/app-upgrade-react-native-sdk","last_synced_at":"2026-02-23T11:55:57.832Z","repository":{"id":65653210,"uuid":"487145393","full_name":"appupgrade-dev/app-upgrade-react-native-sdk","owner":"appupgrade-dev","description":"Official App Upgrade React Native SDK","archived":false,"fork":false,"pushed_at":"2024-05-28T10:21:04.000Z","size":159,"stargazers_count":10,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-16T19:11:34.815Z","etag":null,"topics":["forceappupdate","forceupdate","forceupgrade","react-native"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/app-upgrade-react-native-sdk","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appupgrade-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-30T00:31:26.000Z","updated_at":"2025-02-28T02:15:13.000Z","dependencies_parsed_at":"2024-05-28T13:16:20.092Z","dependency_job_id":null,"html_url":"https://github.com/appupgrade-dev/app-upgrade-react-native-sdk","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":0.07692307692307687,"last_synced_commit":"a95e9984aa11c830a8ce09fcbb1f7a3047b0318c"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/appupgrade-dev/app-upgrade-react-native-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appupgrade-dev%2Fapp-upgrade-react-native-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appupgrade-dev%2Fapp-upgrade-react-native-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appupgrade-dev%2Fapp-upgrade-react-native-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appupgrade-dev%2Fapp-upgrade-react-native-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appupgrade-dev","download_url":"https://codeload.github.com/appupgrade-dev/app-upgrade-react-native-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appupgrade-dev%2Fapp-upgrade-react-native-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29741996,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["forceappupdate","forceupdate","forceupgrade","react-native"],"created_at":"2026-02-23T11:55:57.706Z","updated_at":"2026-02-23T11:55:57.804Z","avatar_url":"https://github.com/appupgrade-dev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# App Upgrade: React-Native SDK\r\n\r\nReact-Native/Expo SDK for [App Upgrade](https://appupgrade.dev)\r\n\r\nApp Upgrade is a service let your users know when to upgrade your apps or force them to upgrade the app.\r\n\r\n[![Twitter](https://img.shields.io/twitter/follow/app_upgrade?style=social)](https://twitter.com/app_upgrade)\r\n[![YouTube](https://img.shields.io/youtube/channel/subscribers/UC0ZVJPYHFVuMwEsro4VZKXw?style=social)](https://www.youtube.com/channel/UC0ZVJPYHFVuMwEsro4VZKXw)\r\n\r\nMany times we need to force upgrade mobile apps on users' mobile. Having faced this issue multiple times decided to find a better way to tackle this problem. After doing some research on how people are doing this there are so many custom solutions or checking with the play store or AppStore API if there is a new version available. Although this works if we just want to nudge users that there is a new version available. It doesn't solve the problem where we want to make a decision.. whether it's a soft graceful update or we want to force update. So here is this product that will make developers' life easy. We can set custom messages.. see the versions in beautify dashboard, and many exciting features in the roadmap ahead.\r\n\r\nThis SDK communicate with App Upgrade and check the version with store version information in App Upgrade. Based on response it will:\r\n- If app needs force update will show a non-dismissable popup for update. On click it will launch app in app store for user to update.\r\n- If app needs to be updated but not a force update, it will show a dismissable popup.\r\n- If no action is required it won't do anything.\r\n\r\nApp Upgrade is a cross platform solution to getting users to easily update your app.\r\n##### Stores Supported:\r\nApple App Store | Google Play Store | Amazon App Store | Huawei AppGallery | Other Android Markets\r\n--- | --- | --- | --- | ---\r\n**✓** | **✓** | **✓** | **✓** |  **✓** If your app market place isn't one of these you can pass your own store URL.\r\n\r\n## Installation\r\nInstall via npm\r\n```\r\nnpm i app-upgrade-react-native-sdk --save\r\n```\r\n\r\nOr if using Expo than you can use `expo install app-upgrade-react-native-sdk` as well.\r\n\r\n## How to use it.\r\n1. Register on App Upgrade and follow the instructions to create project and get the x-api-key.\r\n\r\n2. Import the SDK and use it.\r\n### React Native Example\r\n```\r\nimport {appUpgradeVersionCheck} from 'app-upgrade-react-native-sdk';\r\n\r\n.....\r\n\r\nconst App: () =\u003e Node = () =\u003e {\r\n\r\n  const xApiKey = \"MDNmNmZkNDEtNmNkMi00NzY3LThjOWEtYWYxMGFjZWQ0ZjI2\"; // Your project key\r\n  const appInfo = {\r\n    appId: 'com.android.com' or '1549468967', // Your app id in play store or app store\r\n    appName: 'Wallpaper app', // Your app name\r\n    appVersion: '1.0.0', // Your app version\r\n    platform: 'android', // App Platform, android or ios\r\n    environment: 'production', // App Environment, production, development\r\n    appLanguage: 'es' //Your app language ex: en, es etc. Optional.\r\n  };\r\n\r\n  // Alert config is optional\r\n  const alertConfig = {\r\n    title: 'Please Update',\r\n    updateButtonTitle: 'Update Now',\r\n    laterButtonTitle: 'Later',\r\n    onDismissCallback: () =\u003e { console.log('Dismiss') },\r\n    onLaterCallback: () =\u003e { console.log('Later') }\r\n    onUpdateCallback: () =\u003e { console.log('Update') }\r\n  };\r\n\r\n  appUpgradeVersionCheck(appInfo, xApiKey, alertConfig);\r\n\r\n  return (\r\n      \u003cSafeAreaView style={backgroundStyle}\u003e\r\n        ...\r\n      \u003c/SafeAreaView\u003e\r\n  );\r\n};\r\n\r\n```\r\n\r\n### Expo Example:\r\n```\r\nimport {appUpgradeVersionCheck} from 'app-upgrade-react-native-sdk';\r\n\r\n.....\r\n\r\nexport default function App() {\r\n  const xApiKey = \"MDNmNmZkNDEtNmNkMi00NzY3LThjOWEtYWYxMGFjZWQ0ZjI2\"; // Your project key\r\n  const appInfo = {\r\n    appId: 'com.android.com' or '1549468967', // Your app id in play store or app store\r\n    appName: 'Wallpaper app', // Your app name\r\n    appVersion: '1.0.0', // Your app version\r\n    platform: 'android', // App Platform, android or ios\r\n    environment: 'production', // App Environment, production, development\r\n    appLanguage: 'es' //Your app language ex: en, es etc. Optional.\r\n  };\r\n\r\n  // Alert config is optional\r\n  const alertConfig = {\r\n    title: 'Please Update',\r\n    updateButtonTitle: 'Update Now',\r\n    laterButtonTitle: 'Later',\r\n    onDismissCallback: () =\u003e { console.log('Dismiss') },\r\n    onLaterCallback: () =\u003e { console.log('Later') }\r\n    onUpdateCallback: () =\u003e { console.log('Update') }\r\n  };\r\n\r\n  appUpgradeVersionCheck(appInfo, xApiKey, alertConfig);\r\n\r\n  return (\r\n    \u003cView style={styles.container}\u003e\r\n      \u003cText\u003eOpen up App.js to start working on your app!\u003c/Text\u003e\r\n      \u003cStatusBar style=\"auto\" /\u003e\r\n    \u003c/View\u003e\r\n  );\r\n}\r\n\r\n```\r\n### Note:\r\n1. For opening the app store or play store the app should be live.\r\n2. It might not be able to open the app store or play store in simulator. You can try it in physical device.\r\n3. If you are using the same code base for both android and ios than you can detect the platform and provide the appId.\r\n4. You can find a sample app from here [app-upgrade-react-native-demo-app](https://github.com/appupgrade-dev/app_upgrade_react_native_demo_app)\r\n5. Read detailed blog on how to integrate from here [How to upgrade/force upgrade React Native app](https://appupgrade.dev/blog/how-to-force-upgrade-react-native-app)\r\n\r\n### Example with store other than app store or play store.\r\nIf you want users to redirect to store other than app store or playstore. You can add these additional parameters **preferredAndroidMarket** see the example below.\r\n```\r\nimport {appUpgradeVersionCheck, PreferredAndroidMarket } from 'app-upgrade-react-native-sdk';\r\n\r\n.....\r\n\r\nconst App: () =\u003e Node = () =\u003e {\r\n\r\n  const xApiKey = \"MDNmNmZkNDEtNmNkMi00NzY3LThjOWEtYWYxMGFjZWQ0ZjI2\"; // Your project key\r\n  const appInfo = {\r\n    appId: 'com.android.com' or '1549468967', // Your app id in play store or app store\r\n    appName: 'Wallpaper app', // Your app name\r\n    appVersion: '1.0.0', // Your app version\r\n    platform: 'android', // App Platform, android or ios\r\n    environment: 'production', // App Environment, production, development\r\n    appLanguage: 'es' //Your app language ex: en, es etc. Optional.\r\n    preferredAndroidMarket: PreferredAndroidMarket.AMAZON // or PreferredAndroidMarket.HUAWEI or PreferredAndroidMarket.OTHER If not provided default is Google playstore. Optional\r\n  };\r\n\r\n  appUpgradeVersionCheck(appInfo, xApiKey);\r\n\r\n  return (\r\n      \u003cSafeAreaView style={backgroundStyle}\u003e\r\n        ...\r\n      \u003c/SafeAreaView\u003e\r\n  );\r\n};\r\n\r\n```\r\n\r\n- preferredAndroidMarket: PreferredAndroidMarket.AMAZON // or PreferredAndroidMarket.HUAWEI or PreferredAndroidMarket.OTHER If not provided default is Google playstore. If SDK fails to open preferred market place in case marketplace is not available then default Google playstore will be open.\r\n\r\nIf you want to redirect user to some other android market place you can add the following fields:\r\n```\r\npreferredAndroidMarket: PreferredAndroidMarket.OTHER\r\notherAndroidMarketUrl: 'https://someotherandroidmarket.com/app/id'// Required if preferredAndroidMarket is Other.\r\n```\r\n\r\n```\r\nimport {appUpgradeVersionCheck, PreferredAndroidMarket } from 'app-upgrade-react-native-sdk';\r\n\r\n.....\r\n\r\nconst App: () =\u003e Node = () =\u003e {\r\n\r\n  const xApiKey = \"MDNmNmZkNDEtNmNkMi00NzY3LThjOWEtYWYxMGFjZWQ0ZjI2\"; // Your project key\r\n  const appInfo = {\r\n    appId: 'com.android.com' or '1549468967', // Your app id in play store or app store\r\n    appName: 'Wallpaper app', // Your app name\r\n    appVersion: '1.0.0', // Your app version\r\n    platform: 'android', // App Platform, android or ios\r\n    environment: 'production', // App Environment, production, development\r\n    appLanguage: 'es' //Your app language ex: en, es etc. Optional.\r\n    preferredAndroidMarket: PreferredAndroidMarket.OTHER\r\n    otherAndroidMarketUrl: 'https://someotherandroidmarket.com/app/id'// Required if preferredAndroidMarket is Other.\r\n  };\r\n\r\n  appUpgradeVersionCheck(appInfo, xApiKey);\r\n\r\n  return (\r\n      \u003cSafeAreaView style={backgroundStyle}\u003e\r\n        ...\r\n      \u003c/SafeAreaView\u003e\r\n  );\r\n};\r\n\r\n```\r\n\r\n## Example Screenshot\r\n### Android\r\nFor force upgrade only Update button is enable and user cannot skip it.\r\nFor recommended upgrade Update and Later button is enable. User can skip it.\r\n\r\n![image](https://raw.githubusercontent.com/appupgrade-dev/app-upgrade-assets/main/images/forceupgrade_android.png)\r\n\r\n### iOS\r\n\r\n![image](https://raw.githubusercontent.com/appupgrade-dev/app-upgrade-assets/main/images/forceupgrade_ios.jpg)\r\n\r\n\r\n### Callbacks Documentations\r\nSDK provides you two callbacks.\r\n1. onDismissCallback\r\n    onDismissCallback callback is called when the dismisses the popup, by clicking elsewhere on the screen. In the non-force upgrade, SDK will show a popup with the Later button and the Update Now button. If the user just clicks outside elsewhere the popup it will dismiss and SDK will call onDismissCallback.\r\n\r\n2. onLaterCallback\r\n    If the user clicks on the Later button the SDK will call the onLaterCallback. You can use these for tracking purposes or for something else. onLaterCallback can be used to set a timer and remind the user later that can be done from the app.\r\n\r\n3. onUpdateCallback\r\n    If the user clicks on the Update button the SDK will call the onUpdateCallback. You can use these for tracking purposes or for something else.\r\n\r\n## App Upgrade Docs\r\nFor more information visit [App Upgrade](https://appupgrade.dev)\r\n\r\n### Changelog\r\n\r\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\r\n\r\n### Contributing\r\n\r\nPlease see [CONTRIBUTING](CONTRIBUTING.md) and [CODE OF CONDUCT](CODE_OF_CONDUCT.md) for details.\r\n\r\n### License\r\n\r\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\r\n\r\n## Need help?\r\n\r\nIf you're looking for help, try our [Documentation](https://appupgrade.dev/docs/) or our [FAQ](https://appupgrade.dev/docs/app-upgrade-faq).\r\nIf you need support please write to us at support@appupgrade.dev\r\n\r\n### Happy Coding!!!\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappupgrade-dev%2Fapp-upgrade-react-native-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappupgrade-dev%2Fapp-upgrade-react-native-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappupgrade-dev%2Fapp-upgrade-react-native-sdk/lists"}