{"id":25860959,"url":"https://github.com/chronogolf/nativescript-store-update","last_synced_at":"2025-03-01T23:03:32.308Z","repository":{"id":25846772,"uuid":"100644728","full_name":"chronogolf/nativescript-store-update","owner":"chronogolf","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-18T20:29:06.000Z","size":60739,"stargazers_count":19,"open_issues_count":24,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-26T12:41:05.138Z","etag":null,"topics":["android","chronogolf","ios","nativescript","nativescript-plugin","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chronogolf.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":"2017-08-17T20:57:22.000Z","updated_at":"2024-05-30T16:04:19.000Z","dependencies_parsed_at":"2024-06-21T17:54:07.196Z","dependency_job_id":"3eb59651-3245-48e5-9e1a-782edf07e8b5","html_url":"https://github.com/chronogolf/nativescript-store-update","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronogolf%2Fnativescript-store-update","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronogolf%2Fnativescript-store-update/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronogolf%2Fnativescript-store-update/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronogolf%2Fnativescript-store-update/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chronogolf","download_url":"https://codeload.github.com/chronogolf/nativescript-store-update/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241435161,"owners_count":19962404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["android","chronogolf","ios","nativescript","nativescript-plugin","typescript"],"created_at":"2025-03-01T23:03:31.597Z","updated_at":"2025-03-01T23:03:32.291Z","avatar_url":"https://github.com/chronogolf.png","language":"TypeScript","readme":"# Nativescript-store-update\n\n[![npm](https://img.shields.io/npm/v/nativescript-store-update.svg)](https://www.npmjs.com/package/nativescript-store-update)\n[![npm](https://img.shields.io/npm/dt/nativescript-store-update.svg?label=npm%20downloads)](https://www.npmjs.com/package/nativescript-store-update)\n\n[![NPM](https://nodei.co/npm/nativescript-store-update.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/nativescript-store-update/)\n\nThis plugin allows you to define a notification strategy regarding your app updates. You are able to specify if you want to force, offer or ignore an update based on the new version available in the platform store.\n\nFor example, you could want to force all major version update, but offer the option to your user to chose to update or skip a minor or patch version.\n\nYou can also specify how many days after the update release you want to display the alert.\n\n## Prerequisites\n\nYou need to add appversion plugins for this one to work:\n```zsh\ntns plugin add @nativescript/appversion\n```\n\n## Installation\n\n```zsh\ntns plugin add nativescript-store-update\n```\n\n## Usage\n\nIn your `main.ts` or `app.ts` file, before app start, call `StoreUpdate.init` with desired options like so:\n\n``` javascript\n    import { StoreUpdate, AlertTypesConstants } from \"nativescript-store-update\";\n\n    StoreUpdate.init({\n        notifyNbDaysAfterRelease: 1,\n        majorUpdateAlertType: AlertTypesConstants.OPTION\n    })\n```\n\n## Localization\n\nThe plugin contains some default translations inside json files located in `src/i18n` folder and required by hand in the `src/helpers/locales.helper.ts` file.\nYou can also specify a custom translation in the plugin initialization through the configuraiton options.\nIf you want to contribute a regionalized translation, you must use the `lang-regionCode` format specified in [Apple doc](https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html), but with the country lowercased (ex: `fr-ca`, `en-us`)\n\n\n## API\n\n### Configuration options\n| Property | Default | Description |\n| --- | --- | --- |\n| **majorUpdateAlertType** | FORCE | Alert type for major version change (e.g: A.b.c.d) |\n| **minorUpdateAlertType** | OPTION | Alert type for minor version change (e.g: a.B.c.d) |\n| **patchUpdateAlertType** | NONE | Alert type for major version change (e.g: a.b.C.d) |\n| **revisionUpdateAlertType** | NONE | Alert type for revision version change (e.g: a.b.c.D) |\n| **notifyNbDaysAfterRelease** | `1` | Delays the update prompt by a specific number of days |\n| **countryCode** | `en` | country store code |\n| **alertOptions** | null | Customize alert dialog text, bypasses the Locale json |\n\n### Alert types\n| Key | Value | Description |\n| --- | --- | --- |\n| **FORCE** | `1` | Show an alert that can't be skipped |\n| **OPTION** | `2` | Show an alert that can be skipped |\n| **NONE** | `3` | Don't display alert at all |\n\n### AlertOptions configuration (Optional)\n| Property | Default | Description |\n| --- | --- | --- |\n| **title** | LocaleText | Dialog title, fallback to the locale json |\n| **message** | LocaleText | Dialog body text, fallback to the locale json |\n| **updateButton** | LocaleText | Dialog update button, fallback to the locale json |\n| **skipButton** | LocaleText | Dialog skip button, fallback to the locale json |\n\n## Development\n\nClone this repository, go in the `src` folder then run the command `npm run setup`\nYou can then use:\n- `npm run demo.ios` or `npm run demo.android` to start the demo\n- `npm run plugin.tscwatch` to watch plugin file and start developing!\n\nThe repo contains 2 demos folder, one with angular, and one without.\nDemos use the bundleId `com.bitstrips.imoji` as their App version contains Major, Minor and Patch numbers, and they update their app really often.\nYou can change parameters passed ton package init in `main.ts` or `app.ts` files and change app version in android `app.gradle` and ios `info.plist` config files to test the feature.\n\n## License\n\nApache License Version 2.0, January 2004\n\n\n## Contributors\n- [Jérémy Pelé](https://github.com/jeremypele)\n- [Simon Bats](https://github.com/SBats)\n- [Steve McNiven-Scott](https://github.com/sitefinitysteve)\n- [Codeback Software](https://github.com/codeback)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchronogolf%2Fnativescript-store-update","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchronogolf%2Fnativescript-store-update","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchronogolf%2Fnativescript-store-update/lists"}