Reputation: 23654
I recently rebuilt my iOS platform in my ionic/cordova project. In that process I somehow broke my push functionality. Before this it worked beautifully.
Now, when I launch the app to a device in Xcode: In Xcode debugger I see all the normal pushwoosh API calls happening as the app is loading but without the APP ID, so they're all failing.
The important thing here is that the plugin is being loaded seems to be trying to work
Right after those errors in the console, I get this one, which I can only see when I attach a safari console debugger to the app running on the phone:
module com.pushwoosh.plugins.pushwoosh.PushNotification not found
The app just goes to a white screen, and I am pretty sure it's because of that error - when I test the app out in a browser (where cordova is not loaded), it runs fine.
I set my APP ID right from the start of the app with this:
var pushNotification = cordova.require("com.pushwoosh.plugins.pushwoosh.PushNotification");
pushNotification.onDeviceReady({
pw_appid: PW_APPID
});
I have uninstalled and reinstalled the plugin several times. I have removed and then added the platform as well. In this process I tried updating my cordova-ios to 4.1.0 but that introduced a whole new set of headaches, so I reverted back to cordova-ios 3.8.0
What other troubleshooting can I do to see what is going on?
Here's some other diagnostics....
RocketHQ:rr-app-newest laphona$ ionic -v
1.7.14
RocketHQ:rr-app-newest laphona$ cordova -v
6.0.0
RocketHQ:rr-app-newest laphona$ cordova plugin list
com.cordova.plugins.sms 0.1.9 "Cordova SMS Plugin"
com.unarin.cordova.beacon 3.4.0 "Proximity Beacon Plugin"
cordova-plugin-app-event 1.2.0 "Application Events"
cordova-plugin-bluetooth-serial 0.4.5 "Bluetooth Serial"
cordova-plugin-calendar 4.4.7 "Calendar"
cordova-plugin-camera 2.1.1 "Camera"
cordova-plugin-console 1.0.2 "Console"
cordova-plugin-device 1.1.1 "Device"
cordova-plugin-file 4.1.1 "File"
cordova-plugin-file-transfer 1.5.0 "File Transfer"
cordova-plugin-freshdesk-mobihelp 1.1.0 "Mobihelp Plugin for Phonegap"
cordova-plugin-geolocation 2.1.0 "Geolocation"
cordova-plugin-google-analytics 0.8.1 "Google Universal Analytics Plugin"
cordova-plugin-inappbrowser 1.3.0 "InAppBrowser"
cordova-plugin-network-information 1.2.0 "Network Information"
cordova-plugin-splashscreen 3.2.1 "Splashscreen"
cordova-plugin-whitelist 1.2.1 "Whitelist"
cordova-sqlite-storage 0.8.4-dev "Cordova sqlite storage plugin (core version)"
cordova.plugins.diagnostic 2.3.13 "Diagnostic"
de.appplant.cordova.plugin.local-notification 0.8.4 "LocalNotification"
ionic-plugin-keyboard 2.0.1 "Keyboard"
org.nypr.cordova.hockeyappplugin 0.1.0 "Device"
org.nypr.cordova.nslogger-cocoalumberjack-connector-plugin 0.1.0 "Device"
pushwoosh-cordova-plugin 4.2.2
Upvotes: 1
Views: 329
Reputation: 23654
I just found out from the cordova pushwoosh authors:
To support latest version of Cordova and Ionic we had to rename plugin id to
var pushNotification = cordova.require("pushwoosh-cordova-plugin.PushNotification");
It's reflected in the docs.
Upvotes: 1