Phonegap-plugin-push is not in the project

Hey!
I’m working with ionic view and I’m trying to work with push through firebase
I tried some plugins but I did nothing to work for me.

I have tried:
<plugin name = "cordova-plugin-firebase" spec = "^ 0.1.24" />
But I do not get a tokens
I tried
<plugin name = "phonegap-plugin-push" spec = "^ 2.0.0">
But I get an error that PushNotification does not exist.
I checked with “Remote devices” and I see that phonegap-plugin-push does not even appear in the project
I tried to install several times but without success.
Can someone please help me, I’ve been working tips

thanks!!!

Ionic View only supports a limited number of plugins:
https://docs.ionic.io/tools/view/#supported-plugins
Check if yours are supported. If not, you will already have to build the app yourself (you will anyway to release the app).

Sorry to explain myself correctly
My intent I work with: https://apps.ionic.io/apps
Rather than: https://dashboard.ionicjs.com/apps
And I check the app by: ionic package build android and download the app from the site

Ok, you saying in your first post

confused me then.

With ionic package this should work just fine. Both plugins should work.

What exactly did you implement in your app?

Sorry :slight_smile:
So I tried to work with cordova-plugin-firebase like that:

                var tries = 100;
                var interval = setInterval(function () {
                    if (--tries < 0) {
                        clearInterval(interval);
                        console.log('Firebase Token could not be acquired!');
                    }
                    console.log(tries);

                    window.FirebasePlugin.onTokenRefresh(function (token) {
                        if (token !== null && token !== '') {
                            alert(token);
                            $localStorage.token = token;
                            clearInterval(interval);
                        }
                    }, function (error) {
                        alert(error);
                    });

                }, 100);

I also tried window.FirebasePlugin.getToken and nothing

with phonegap-plugin-push I do not even see him in the project with “Remote devices”
02

but in my project this is my plugins:

cordova-inappbrowser 1.0.6 "InAppBrowser"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.1.0 "Compat"
cordova-plugin-console 1.0.5 "Console"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-file-transfer 1.6.3 "File Transfer"
cordova-plugin-firebase 0.1.24 "Google Firebase Plugin"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.1 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-push 2.0.0 "PushPlugin"

Are you really using Ionic v1? Post your ionic info output please.


cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.9.2
    ionic (Ionic CLI) : 3.9.2

global packages:

    Cordova CLI : 7.0.1 
    Gulp CLI    : CLI version 3.9.1 Local version 3.9.1

local packages:

    Cordova Platforms : android 6.2.3 ios 4.4.0
    Ionic Framework   : ionic1 1.3.3

System:

    ios-sim : 6.0.0 
    Node    : v6.10.2
    npm     : 5.3.0 
    OS      : macOS Sierra
    Xcode   : Xcode 8.3.3 Build version 8E3004b 

That al looks recent.

I have no recent Ionic v1 experience, so I am out.

Last tip I can give you: http://ngcordova.com/docs/plugins/pushNotificationsV5/

It is still based on phonegap-plugin-push

Yes, which works perfectly fine for thousands of Ionic developers. It just makes working with it a bit easier.

:frowning: Still I get:

Uncaught ReferenceError: PushNotification is not defined
    at Object.initialize (ng-cordova.js:6378)
    at app.js:69

Does anyone have an idea? Or experience with this problem? :cry: