Hey everyone,
I’m currently looking at implementing HockeyApp in an Ionic 3 app with these plugins:
“cordova-plugin-hockeyapp”: “^5.1.2”,
“ionic-hockeyapp”: “^0.2.0”,
The option to open a feedback form in the app works perfectly (using “hockeyApp.feedback();”), however, the “hockeyApp.checkHockeyAppUpdates();” command doesn’t seem to detect new app versions and doesn’t show any notifications or incentives to update to the latest version which it should do according to the docs here: https://www.npmjs.com/package/cordova-plugin-hockeyapp. The function doesn’t appear to do much.
What I’ve done so far (skipped unrelated lines:
import {Config, Platform, App, ToastController} from 'ionic-angular';
import {HockeyApp} from 'ionic-hockeyapp';
export class ScanApp {
constructor(app: App, hockeyApp: HockeyApp, platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, config: Config, private pageProvider: PagesProvider, api: ApiProvider, private toastCtrl: ToastController, private network: Network) {
platform.ready().then(() => {
let androidAppId = null;
let iosAppId = 'xxxxxxxxxxx'; // ID take from HockeyApp dashboard
let autoSendCrashReports = true;
let ignoreCrashDialog = true;
hockeyApp.start(androidAppId, iosAppId, autoSendCrashReports, ignoreCrashDialog);
hockeyApp.checkHockeyAppUpdates();
platform.registerBackButtonAction(() => {
let nav = app.getRootNav();
if (nav.canGoBack()) {
nav.pop();
} else {
nav.setRoot(this.rootPage);
}
});
});
}
}
I did notice a difference in the API from the the cordova-plugin and ionic-hockeyapp:
The cordova plugin has "hockeyapp.checkForUpdate();"
And the Ionic plugin has “hockeyApp.checkHockeyAppUpdates();”
Looking at the plugin’s code, it seems to be calling the regular checkForUpdate behind the scenes:
this.window[<any>'hockeyapp'].checkForUpdate((success:any) => {
But calling checkForUpdate results in an error that the function is not defined, so I assume I should be using checkHockeyAppUpdates.
Am I doing somethng wrong (perhaps something else has to be done besides calling checkHockeyAppUpdates)? Or is there a different way to call the function in Ionic?
Ionic info:
Cordova CLI: 6.5.0
Ionic Framework Version: 3.9.2
Ionic CLI Version: 2.1.14
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 3.1.7
ios-deploy version: 1.9.2
ios-sim version: 6.1.2
OS: macOS
Node Version: v7.10.0
Xcode version: Xcode 9.2 Build version 9C40b
Any help would be greatly appreciated!
Thanks in advance!