Open greenlaw110 opened 8 years ago
Okay, I am pretty sure push_v5
doesn't work with the https://github.com/phonegap-build/PushPlugin. I got the new error after adding an init
method to PushNotification
module:
TypeError: r.on is not a function. (In 'r.on("registration",function(e){t.resolve(e.registrationId)})', 'r.on' is undefined)
You are correct; it works for the first plugin, not the second. If you want to create a patch that lets it work for both, I'll gladly accept a PR.
How was this solved? I am getting uncaught TypeError: PushNotification.init is not a function
while using the first plugin https://github.com/phonegap/phonegap-plugin-push/
I am using
push_v5
plugin and phonegap push plugin. I found it doesn't work on my ios app built by ionic ios platform. The error message is:The relevant source code of
push_v5
:I did a bit research on this issue and found there are two different phonegap push notification plugin:
It looks like
push_v5
works with the first one, however we are using the second one which does not provide theinit
function instead this is what it did to initialize aPushNotification
plugin:And the safari debug tool verified that:
Question: does
push_v5
works with thephonegap-build
version at all (if we make it pick up thewindow.pushNotification
instance). Or are you going to support that?