# Push plugin issue

**URL:** <https://forum.ionicframework.com/t/push-plugin-issue/125268>\
**Category:** ionic-v3\
**Created:** [March 20, 2018, 1:19pm UTC](https://forum.ionicframework.com/t/push-plugin-issue/125268 "2018-03-20T13:19:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![RajeshAdam9999](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@RajeshAdam9999](https://forum.ionicframework.com/u/RajeshAdam9999)\
**Post date:** [March 20, 2018, 1:19pm UTC](https://forum.ionicframework.com/t/push-plugin-issue/125268/1 "2018-03-20T13:19:09Z")

</div>

Hello,

I want implement push notification in our APP. Followed all the steps from

> **[Ionic Framework](https://ionicframework.com/docs/native/push/)**
>
> Ionic is the app platform for web developers. Build amazing mobile, web, and desktop apps all with one shared code base and open web standards

But I am facing an issue of Push plugin not installed. Following are the list of errors:

Native: tried calling Push.hasPermission, but the Push plugin is not installed.  
pluginWarn

Install the Push plugin: 'ionic cordova plugin add phonegap-plugin-push’  
pluginWarn

Native: tried calling PushNotification.init, but the PushNotification plugin is not installed.

Please do help urgently.

Thanks,  
Raj

---

<div class="post-metadata">

**Author:** ![obinnae](https://avatars.discourse-cdn.com/v4/letter/o/a183cd/32.png) [@obinnae](https://forum.ionicframework.com/u/obinnae)\
**Post date:** [March 20, 2018, 1:23pm UTC](https://forum.ionicframework.com/t/push-plugin-issue/125268/2 "2018-03-20T13:23:56Z")

</div>

Try calling it after platform is ready

```auto
this.platform.ready().then(() => {
// plugin initialization and stuff goes here
})

```

Of course, make sure you import Platform from ionic-angular.

Good luck.

---

<div class="post-metadata">

**Author:** ![RajeshAdam9999](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@RajeshAdam9999](https://forum.ionicframework.com/u/RajeshAdam9999)\
**Post date:** [March 20, 2018, 1:59pm UTC](https://forum.ionicframework.com/t/push-plugin-issue/125268/3 "2018-03-20T13:59:07Z")

</div>

@obinnae Thanks for your reply. I tried as above but still no success. Following is the code of the same:

```auto

platform.ready().then(() => {
        this.push.hasPermission().then((res: any) => {
            alert(res.isEnabled);
            if (res.isEnabled) {
            console.log('We have permission to send push notifications');
            } else {
            console.log('We don\'t have permission to send push notifications');
            }
        });
        const options: PushOptions = {
            android: {
            senderID: 'XXXXXXX'}, //added actual id in my app
            ios: {
            alert: 'true',
            badge: true,
            sound: 'false'
            },
            windows: {},
            browser: {
                pushServiceURL: 'http://push.api.phonegap.com/v1/push'
            }
        };
        const pushObject: PushObject = this.push.init(options);

        pushObject.on('notification').subscribe((notification: any) => console.log('Received a notification', notification));

        pushObject.on('registration').subscribe((registration: any) => alert(registration.registrationId));

        pushObject.on('error').subscribe(error => console.error('Error with Push plugin', error));
      
    });

```

Please let me know what I am missing.

Thanks,  
Raj

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [March 20, 2018, 2:39pm UTC](https://forum.ionicframework.com/t/push-plugin-issue/125268/4 "2018-03-20T14:39:50Z")

</div>

Please edit your post, it is not very readable at the moment.  
Use the `</>` button above the input field to format your code, command line output or error message (select the text first, then click the button or wrap it in ````` manually). Check the preview if it looks better. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.

---

<div class="post-metadata">

**Author:** ![mahcen](https://avatars.discourse-cdn.com/v4/letter/m/ba9def/32.png) [@mahcen](https://forum.ionicframework.com/u/mahcen)\
**Post date:** [April 1, 2018, 2:28pm UTC](https://forum.ionicframework.com/t/push-plugin-issue/125268/5 "2018-04-01T14:28:32Z")

</div>

Hey RajeshAdam9999,  
please did you fixe your issue !!? i have the same one!

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:44pm UTC](https://forum.ionicframework.com/t/push-plugin-issue/125268/6 "2021-07-19T21:44:20Z")

</div>

Closed on July 19, 2021, 9:44pm UTC


