You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
i'm trying to use your plugin with Ionic 4.
This is my app.component.ts file content:
import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { TabsPage } from '../pages/tabs/tabs';
declare var cordova:any;
@Component({
templateUrl: 'app.html'
})
export class MyApp {
rootPage:any = TabsPage;
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
statusBar.styleDefault();
splashScreen.hide();
});
cordova.plugins.ParsePushPlugin.getInstallationId(function (id) {
cordova.plugins.ParsePushPlugin.on('receivePN', function (pn) {
console.log(pn);
});
});
}
}
When I'm going to compile for iOS i've this output:
(node:27894) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:27894) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
But sometimes (I don't know why) it passes through that error, compile successfully for iOS and push notifications works perfectly.
Could you help me?
The text was updated successfully, but these errors were encountered:
Move your code calling the parsepush plugin to be on a new line immediately below the splashscreen.hide. You need to wait for platform.ready to fire before calling any Cordova plugins.
The way you have it now it isn’t waiting for platform.ready so if you call it too early it will fail.
Hi,
i'm trying to use your plugin with Ionic 4.
This is my app.component.ts file content:
When I'm going to compile for iOS i've this output:
But sometimes (I don't know why) it passes through that error, compile successfully for iOS and push notifications works perfectly.
Could you help me?
The text was updated successfully, but these errors were encountered: