Skip to content

Releases: NextFaze/ionic-manup

0.4.1 - Fix optional update

24 Sep 00:37
Compare
Choose a tag to compare

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!

Fix i18n issues, add Italian language

16 May 00:44
Compare
Choose a tag to compare

This release fixes issues with how ngx-translate was being used with ManUp. ManUp now loads its translation strings just before it needs to present 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

Italian Language Support

This release also adds translation support for Italian language! Thanks @grcasanova for the contribution!

0.3.4 Fix app store buttons

08 Dec 04:33
Compare
Choose a tag to compare

This patch release fixes #28, making the buttons linking the user to update sites work again. Thanks to @yanglongji for flagging this bug.

0.3.3 - Bugfix

13 Nov 05:37
Compare
Choose a tag to compare

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

0.3.1 - Better Http Error Handling

08 Nov 06:14
Compare
Choose a tag to compare

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.

Closes #21

0.2.3 - Peer Dep Relaxation

23 Oct 23:33
Compare
Choose a tag to compare

Just a point release to the 0.2 line to relax the peer dependency requirements, which should make it much easier to build with current Ionic.

0.3.0 Dependency Update, Optional Translate

11 Oct 03:47
Compare
Choose a tag to compare

This release updates dependencies to the latest versions, which closes a few issues. This release has breaking changes compared to 0.2

Use @ionic-native

Ionic has restructured Ionic Native into multiple packages, rather than one monolith. We now use @ionic-native/* package dependencies now too. This closes #13

Update Instructions

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

Truly optional ngx-translate

This release also updates to a more current ngx-translate and also fixes #16, making ngx-translate a truly optional dependency.

Update instructions (I don't want translations)

Just uninstall ngx-translate

npm uninstall --save @ngx-translate/core

Update Instructions (I want translations)

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.

0.2.1 ngx-translate update

18 Jul 03:46
Compare
Choose a tag to compare

This is a minor update that changes the peer dependency from ng2-translate to the current ngx-translate. Thanks @zbarbuto for the update.

0.2.0 Local Storage Fallback

28 Apr 07:38
Compare
Choose a tag to compare

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.

0.1.0 - Internationalisation Support

17 Mar 06:02
Compare
Choose a tag to compare

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.

Using i18n

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.

With Built in translations

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.

Boostrap ng2-translate with your app!

    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.

With your own strings

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.

Setup your language files

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"
        }
    }
 }

Tell ManUp to use external translations

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})