Push-plugin issue!


#1

Hey everyone!

I want to use push notification, but i got this issue ::
[console.warn: Native: tried calling Push.hasPermission, but the Push plugin is not installed.
console.warn: Install the Push plugin: ‘ionic cordova plugin add phonegap-plugin-push’

can anyone to help me!!


#2

I need help please!!!


#3

you have to upgrade your push plugin


#4

Hi @mahcen

Try below plugin to upgrade your push plugin

thanks,


#5

Are you trying to run behind “platforms”, right? Look, ionic serve will not work. It’s simple, but important to say.


#6

I installed :
1- ionic cordova plugin add phonegap-plugin-push
2- npm install --save @ionic-native/push
After that :
3- cordova platform add android@7.1.0

when i excute with ionic serve -c to simulate with devApp :
this.push.hasPermission()
.then((res: any) => {
if (res.isEnabled) {
console.log(‘We have permission to send push notifications’);
} else {
console.log(‘We do not have permission to send push notifications’);
}
});
i have this issue :
console.warn: Native: tried calling Push.hasPermission, but the Push plugin is not installed.
console.warn: Install the Push plugin: ‘ionic cordova plugin add phonegap-plugin-push’

i must fixe this issue!!!


#7

@mahcen, look my other reply, you can not use ionic serve when your project is using native plugins. In your case, you need use ionic cordova run browser or ionic cordova run android, ok? Try this and tell us.