See the READMe for update path.
- Return the result of the ManUp run #26
the call to validate()
will now resolve with either:
- the
AlertType
result that happened or null
if ManUp fails for some reason.
-
Allow support for custom messages
-
Fix calling
validate()
multiple times in one launch returning the same result.
See the README for information on how to configure these messages in your ManUp file
Add support to Ionic 4. Thanks to @Mohammad-shoman
Bug fix release corrects a problem where the validate
promise was not
resolving even after the update alert had been dismissed. Thanks to @kfrederix
for finding and providing the fix to this!
This release fixes issues with how ngx-translate was being used with ManUp. ManUp now loads its translation strings just before it needs to prevent an alert. Previously, it loaded translation strings on initialisation. This could cause issues with the host app losing translation strings, or ManUp showing raw untranslated strings to the user when presenting an alert.
All detailed in #31
This release also adds translation support for Italian language! Thanks @grcasanova for the contribution!
Bugfix release which stops ManUp throwing an unhandled exception if running on a non-Cordova platform (ie web). ManUp does not present alerts on web, because we assume the web is always on the latest version.
Not crashing with an exception is much better thand crashing.
This patch release fixes #28, making the buttons linking the user to update sites work again. Thanks to @yanglongji for flagging this bug.
This release fixes a bug where validate would always succeed, regardless of app version. Underlying bug caused by missing rxjs operator, which has now been resolved.
Thanks @TheMadBug for bringing #24 to our attention
This release fixes an issue where ManUp threw an unhandled exception if the http request failed, for example if the browser aborted the request due to failed CORS preflight checks
This release updates dependencies to the latest versions, which closes a few issues. This release has breaking changes compared to 0.2
Ionic has restructured Ionic Native into multiple packages, rather than one monolith. We now use @ionic-native/*
package dependencies now too. This closes #13
Remove ionic-native
unless you are still using it elsewhere in your app, then install the correct packages:
npm uninstall --save ionic-native
npm install --save @ionic-native/app-version @ionic-native/in-app-browser
This release also updates to a more current ngx-translate
and also fixes #16, making ngx-translate
a truly optional dependency.
Just uninstall ngx-translate
npm uninstall --save @ngx-translate/core
You now need to add a provider for the translate service in order for the Angular DI to work properly. Full details are in the README and an example is in the demo app, but you need to update your application bootstrap:
import { ManUpModule, ManUpService, TRANSLATE_SERVICE } from 'ionic-manup';
@NgModule({
declarations: [MyApp, HomePage],
imports: [
...
ManUpModule.forRoot({
url: 'https://example.com/manup.json',
externalTranslations: true
})
],
providers: [
{ provide: TRANSLATE_SERVICE, useClass: TranslateService },
ManUpService,
],
})
The rest should work same as before.
This is a minor update that changes the peer dependency from ng2-translate to the current ngx-translate. Thanks @zbarbuto for the update.
This release integrates ionic-native/storage. ManUp will save the metadata from the remote URL to Storage. If for some reason the remote URL cannot be reached, ManUp will use the cached version in Local Storage.
To get this functionality your app needs to be bootstrapped with Ionic Storage. If Storage is not in use, ManUp will continue working in the same way it did in the previous version.
Welcome to 0.1.0
, ManUp is now a global citizen, supporting internationalisation via the ng2-translate
package.
Well kindof. The only languages currently supported are English, and a Google Translate attempt at Spanish. PRs for translations in additional languages will be welcomed with open arms.
The service uses ng2-translate to support languages other than English. This package is the way recommended by the Ionic developers. Internationalisation is implemented in a backwards compatible, optional way. If your app is bootstrapped with ng2-translate
, then ManUp will use it. If not you get the default English Strings.
To make life easy for app developers, the service includes its own translation strings. All you need to do is add ng2-translate
to your Ionic app and set the active language.
Languages supported are currently limited to English and a Google Translated Spanish. We would love pull requests for new languages.
import { ManUpModule } from 'ionic-manup';
import { TranslateModule } from 'ng2-translate';
// in your module's import array
TranslateModule.forRoot(), ManUpModule.forRoot({ url: 'https://example.com/manup.json' });
Note: This is an absolute bare minimum example of loading the module. Follow the instructions linked to above for how to use ng2-translate
in your app.
If you want to further customise the messages, you can provide your own translations for the ManUp strings. This is the only way we will be supporting customisation of the messages.
Follow the instructions for setting up ng2-translate
with your Ionic 2 app, and add the following tree to your language files:
{
...
"manup": {
"mandatory": {
"title": "Update Required",
"text": "An update to {{app}} is required to continue."
},
"optional": {
"title": "Update Available",
"text": "An update to {{app}} is available. Would you like to update?"
},
"maintenance": {
"title": "{app}} Unavailable",
"text": "{{app}} is currently unavailable, please check back again later."
},
"buttons": {
"update": "Update",
"later": "Not Now"
}
}
}
You need to tell ManUp to use external translations. Modify your Bootstrap like this:
import { ManUpModule } from 'ionic-manup';
// in your module's import array
ManUpModule.forRoot({ url: 'https://example.com/manup.json', externalTranslations: true });
A minor release that fixes a problem with type definitions that should have been fixed in 0.0.5 but wasn't.
0.0.5 has some breaking changes to what the manup.json
metadata file should look like. I expect the format will be stable going forward, perhaps with new keys added, but no more breaking changes to what the file should look like.
- Adds support for the windows platform (yay!)
- Mostly refactoring code to more easily test
We started with the project using Manup
in code. However, since that is short for Mandatory Update, the module and service have been renamed to ManUpModule
and ManUpService
. Strict camel case for the win.
Here's a complete example, below are the things that have changed from 0.0.4.
{
"ios": {
"minimum": "0.0.1",
"latest": "1.0.0",
"url": "http://example.com",
"enabled": true
},
"android": {
"minimum": "1.0.0",
"latest": "1.0.0",
"url": "http://example.com",
"enabled": true
},
"windows": {
"minimum": "1.0.0",
"latest": "1.0.0",
"url": "http://example.com",
"enabled": false
}
}
The update url now uses the key url
instead of link
, which is a much better name for describing a URL.
The app can be enabled or disabled (maintenance mode) on a per platform basis. So, each platform subtree of the metadata has its own enabled
key. So, if your Windows version is broken and if you have no intention of fixing it, you can disable it without affecting other users.
Adds Angular AoT compilation support. Package now includes AoT metadata for use in production Ionic app builds.
Initial Release!