Gary4
asked on
kinvey Push not working for iOS
Hi,
I am not getting any help in the kinvey forums.
Our app is in production and stopped working.
This is my business logic:
From the logging I can see that it is running, but no push is sent when the device is iOS. The push is sent if the device is Android.
Also, a push is sent if I use the Engagement/Message console. So I conclude that my certificate is still correct and the connection to UrbanAirship is working.
I am at a loss as to what is wrong in my code.
It is my understanding that Kinvey may have changed something a few months ago. I have looked at the documentation and my code still looks correct to me.
Gary
I am not getting any help in the kinvey forums.
Our app is in production and stopped working.
This is my business logic:
function onRequest(request, response, modules){
var push = modules.push, collectionAccess = modules.collectionAccess;
var logger = modules.logger;
var iOSAps = { alert: request.body.message, badge: parseInt(request.body.count), sound: "default.wav" };
var iOSExtras = '';
var androidPayload = {message: request.body.message };
logger.info('hi');
collectionAccess.collection('user').findOne({ "_id": collectionAccess.objectID(request.body.KinveyID) }, function(err, user) {
if (user)
{
logger.info('send push');
logger.info(user);
push.sendPayload(user, iOSAps, iOSExtras, androidPayload, function(err, result) {
response.continue();
});
}
});
}
From the logging I can see that it is running, but no push is sent when the device is iOS. The push is sent if the device is Android.
Also, a push is sent if I use the Engagement/Message console. So I conclude that my certificate is still correct and the connection to UrbanAirship is working.
I am at a loss as to what is wrong in my code.
It is my understanding that Kinvey may have changed something a few months ago. I have looked at the documentation and my code still looks correct to me.
Gary
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, well, what I show above is the custom endpoint business logic.
Users are being created so that part works.
Pushes are sent to Android, just not to iOS and there is the problem. I have no idea why not iOS. And it used to work until a couple months ago. And sending from the Kinvey control panel works for both devices so the Urban Airship connection is good and the Apple certificate is good. That is why I am at a loss.
I am getting rather fed up with Kinvey.
Users are being created so that part works.
Pushes are sent to Android, just not to iOS and there is the problem. I have no idea why not iOS. And it used to work until a couple months ago. And sending from the Kinvey control panel works for both devices so the Urban Airship connection is good and the Apple certificate is good. That is why I am at a loss.
I am getting rather fed up with Kinvey.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have iOS8 on my iPad. And apple won't let me downgrade.
I think my users that are complaining also have iOS 8.
I think my users that are complaining also have iOS 8.
ASKER
Hi,
I just want to close this.
We didn't arrive at a solution. I think it is a Kinvey bug that they aren't admitting to.
Thanks for looking at it and offering comments.
I just want to close this.
We didn't arrive at a solution. I think it is a Kinvey bug that they aren't admitting to.
Thanks for looking at it and offering comments.
ASKER
Yes I get the logging info.
Here is one from an ios user.
Open in new window