Closed rwillett closed 6 years ago
Has the documentation just been updated to remove createLocalNotification from IOS?
We thought it had Android AND IOS as supported, it now just says Android.
Rob
Be good to get an answer here
Hi,
Please note that the createLocalNotification method is supported on Android only, and there was no such method for iOS.
Hi, I'm opening this again as the documentation on the website (https://docs.pushwoosh.com/docs/cordova-api-reference#section-createlocalnotification) now states that createLocalNotification works for both IOS and Android. We thought the docs had been updated to now include IOS for createLocalNotification in versions of the plugin.
Just wasted an hour rewriting some code to test this out as it would be great to have it, to find its NOT supported and the documentation is wrong yet again.
This is a problem if we can't trust the official documentation as to what is supported or not, this means we have to ask and waste your time and our own.
Hi Rob,
Checking it right now.
Thanks, would be good to get either the documents updated so we know they are correct.
@rwillett to my knowledge, you have been contacted by our support team, and they provided you with an updated docs. Could you please confirm it?
Just in case, below is a correct way to call this method:
pushNotification.createLocalNotification({msg:"Your message here", seconds: 10, userData:[]});
No docs I'm afraid. I don't want any to be honest, I want the website to be accurate.
So is this method available to IOS?
@rwillett yes, the example above is how it should be called for iOS. Please let us know about results
I've tested this using the following code and can confirm it works on IOS 10 with PushWoosh pushwoosh-cordova-plugin 7.2.3
function SendPushWooshLocalDummyNotification() {
var debugSendPushWooshLocalDummyNotification = debugTrue;
var notification = { seconds: 30 ,
userData: { type: "DisruptionNotification" , disruptionId: -1 } ,
msg: "[A102] Blackwall Tunnel Southern Approach (S/B) - The carriageway is blocked southbound. Collision between two cars. Carriageway blocked. Police on scene are removing vehicles. Expect long delays."
};
if (debugSendPushWooshLocalDummyNotification)
ConsoleLog("SendPushWooshLocalDummyNotification: " + JSON.stringify(notification , null , 2));
pushNotification.createLocalNotification(notification , function () {
if (debugSendPushWooshLocalDummyNotification)
ConsoleLog("SendPushWooshLocalDummyNotification: schedule callback OK");
} , function () {
if (debugSendPushWooshLocalDummyNotification)
ConsoleLog("SendPushWooshLocalDummyNotification: schedule callback failed");
});
}
Hi,
We're trying to use the createLocalNotification as described in the plugin docs at
https://rawgit.com/Pushwoosh/pushwoosh-phonegap-3.0-plugin/master/Documentation/files/PushNotification-js.html#PushNotification.createLocalNotification
Our code is pretty simple
It runs down an array of notifications we want to send and sends them every 20 secs. This is a simple test case for us.
We are getting an error under IOS 8 with 6.3.0 of
We checked plugins/pushwoosh-cordova-plugin/www/PushNotification.js and can see that createLocalNotification is declared. We also checked every other PushNotification.js and can see it in there.
We also tried
and that failed in the same way.
Have we missed something simple? We know that we have created and set pushNotification so its not that.
Thanks
Rob