{"_id":"@anil_sarkar_hansda/react-native-siren-custom","_rev":"1-1a8682b5a3c5616b29cf8a695945b187","name":"@anil_sarkar_hansda/react-native-siren-custom","dist-tags":{"latest":"0.0.6"},"versions":{"0.0.5":{"name":"@anil_sarkar_hansda/react-native-siren-custom","version":"0.0.5","keywords":["React","Native","Siren","Harpy","React Native Siren","Version","Check","App Store"],"author":{"name":"Gant Laborde"},"license":"MIT","_id":"@anil_sarkar_hansda/react-native-siren-custom@0.0.5","maintainers":[{"name":"anil_sarkar_hansda","email":"capitallatera@gmail.com"}],"homepage":"https://github.com/capitallatera/react-native-siren-custom#readme","bugs":{"url":"https://github.com/capitallatera/react-native-siren-custom/issues"},"dist":{"shasum":"054858b9eb369078b379407d704f3fcc00d311b0","tarball":"https://registry.npmjs.org/@anil_sarkar_hansda/react-native-siren-custom/-/react-native-siren-custom-0.0.5.tgz","fileCount":3,"integrity":"sha512-qC4FkHAmH/kliLp5MIyoUsbbTwEtSy6HtRrz92KGYh2s1E/bgFzEeXOk8+dwAsrHN+snPLXmFa+rXkpt/aybpg==","signatures":[{"sig":"MEYCIQC3H/OHwntIgTVIcpcROFoWePqSPXzpOq6Yj8RE9sQ4bwIhAIv9SKj0OYUZqGCuxslthM1mIW8HetqcLOJ4sZTS1Kl3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":6596},"main":"index.js","types":"./index.d.ts","gitHead":"02651a28ab606c7fca04c8fe35e60c9773bb7bb3","scripts":{"test":"ava"},"_npmUser":{"name":"anil_sarkar_hansda","email":"capitallatera@gmail.com"},"repository":{"url":"git+https://github.com/capitallatera/react-native-siren-custom.git","type":"git"},"_npmVersion":"10.9.2","description":"React Native module for checking App version and prompting user.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"apisauce":"^3.1.0","react-native-device-info":"^8.7.1"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/react-native-siren-custom_0.0.5_1741165355688_0.3250565900128999","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@anil_sarkar_hansda/react-native-siren-custom","version":"0.0.6","description":"React Native module for checking App version and prompting user.","main":"index.js","scripts":{"test":"ava"},"repository":{"type":"git","url":"git+https://github.com/capitallatera/react-native-siren-custom.git"},"keywords":["React","Native","Siren","Harpy","React Native Siren","Version","Check","App Store"],"author":{"name":"Gant Laborde"},"license":"MIT","bugs":{"url":"https://github.com/capitallatera/react-native-siren-custom/issues"},"homepage":"https://github.com/capitallatera/react-native-siren-custom#readme","dependencies":{"apisauce":"^3.1.0","react-native-device-info":"^14.0.4"},"_id":"@anil_sarkar_hansda/react-native-siren-custom@0.0.6","gitHead":"84f59aec6912d4815b1a54d7053b48c8e28155ba","types":"./index.d.ts","_nodeVersion":"22.14.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-fRPaPMatTMGfmCnHYJMdyRoiZBe482Pv7skvp2D7z8ccamJQuO3JwNPkOJd1NFB5+IkaFO+H8RpTExqhywIbqA==","shasum":"b774025606c508d3354aebfd604c14f3a7a8f1c0","tarball":"https://registry.npmjs.org/@anil_sarkar_hansda/react-native-siren-custom/-/react-native-siren-custom-0.0.6.tgz","fileCount":3,"unpackedSize":6597,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD0oQNkWpf7Aq4jD1ZHSq5pBeYo1io9oiaizCcvwcnulQIhAJbIKT20BgV1cbFnUgvV4gO5ND/6iNiPbHMgrhrActs+"}]},"_npmUser":{"name":"anil_sarkar_hansda","email":"capitallatera@gmail.com"},"directories":{},"maintainers":[{"name":"anil_sarkar_hansda","email":"capitallatera@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/react-native-siren-custom_0.0.6_1741169476566_0.14778821911209827"},"_hasShrinkwrap":false}},"time":{"created":"2025-03-05T09:02:35.626Z","modified":"2025-03-05T10:11:16.894Z","0.0.5":"2025-03-05T09:02:35.852Z","0.0.6":"2025-03-05T10:11:16.724Z"},"bugs":{"url":"https://github.com/capitallatera/react-native-siren-custom/issues"},"author":{"name":"Gant Laborde"},"license":"MIT","homepage":"https://github.com/capitallatera/react-native-siren-custom#readme","keywords":["React","Native","Siren","Harpy","React Native Siren","Version","Check","App Store"],"repository":{"type":"git","url":"git+https://github.com/capitallatera/react-native-siren-custom.git"},"description":"React Native module for checking App version and prompting user.","maintainers":[{"name":"anil_sarkar_hansda","email":"capitallatera@gmail.com"}],"readme":"![React Native Siren](https://raw.githubusercontent.com/GantMan/react-native-siren/master/_art/siren-horizontal.png)\n\nThe React Native port of the popular [Siren](https://github.com/ArtSabintsev/Siren) / [Harpy](https://github.com/ArtSabintsev/Harpy) Pod and eventually [Gradle](https://github.com/eggheadgames/Siren)\n\n## Install\n```\nnpm install react-native-siren --save\nreact-native link\n```\n\n## Usage\n```javascript\nimport Siren from 'react-native-siren'\n\nconst defaultOptions = {\n  title: 'AwesomeApp has a new update!'\n}\n\nconst versionSpecificRules = [{\n  localVersion: '3.0.2',\n  forceUpgrade: true,\n  title: 'Update your app now',\n  message: 'This version contains a bug that might corrupt your data. You must update to be able to use our app.'\n}]\n\nSiren.promptUser(defaultOptions, versionSpecificRules)\n\n// or\n\nSiren.performCheck().then(({ updateIsAvailable }) => {\n  if (updateIsAvailable) {\n    showCustomUpdateModal()\n  }\n})\n\n```\n\n## Options \n\n| value             | Description             | default |\n| -------------     |-------------            | -----|\n|title              | Alert title             | Update Available |\n|message            | Alert Message           | There is an updated version available on the App Store. Would you like to upgrade? |\n|buttonUpgradeText  | Upgrade Button Text     | Upgrade |\n|buttonCancelText   | Cancel Button Text      | Cancel |\n|forceUpgrade       | Hide Cancel Button      | false |\n\n## Version-specific rules\n\nThere might be situations where you'd like to specify rules dynamically based on what version the device is currently running.\nIf so, pass an array as second argument.\n\n| value             | Description |\n| -------------     |-------------|\n| localVersion      | version currently running on the device |\n| title, message..  | same options as specified in the [Options](#options) section | \n\n## performCheck options\nOptional, in some cases it may be necessary to perform a specific check.\nThe app may only be available in some countries, so you need to make explicit the contry code. \n\n| value    | Description                                                                                                   | default                                     |\n|----------|---------------------------------------------------------------------------------------------------------------|---------------------------------------------|\n| bundleId | id that identifies the app (ex: com.apple.mobilesafari)                                                       | DeviceInfo.getBundleId()                    |\n| country  | [ISO 3166-1 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) | undefined (the API won't filter by country) |\n\n\n#### TADAAAA!\n![update](http://i.imgur.com/PKreDAS.png)\n\n## Can't I just use [CodePush](https://github.com/Microsoft/code-push)?\nFor most things yes, and you should.  Sometimes there are limitations to `code-push`, and you're just stuck shipping a new version when the change is significant.  When code-push fails, Siren will help.\n\nOne goal of this repo is to eventually work with code-push versions along side actual version changes.\n","readmeFilename":"README.md"}