Redth/APNS-Sharp — Issue #17: device not receiving
Author: breggs
Created: 2011-10-12 00:26:29+00:00
State: open

Hi,

I have followed the code and example perfectly. When I call (service.QueueNotification(notification) I get everything sending successfully, no errors. But the device doesnt get the notification.

I know I am using the right token, certificate etc cause the device receives no problem when using my PHP equivalent project.

Why is the device not receiving the push when using this .Net library?

My code:
Notification notification = new Notification(token.Token);

notification.Payload.Alert.Body = pushMsg;
notification.Payload.Alert.ActionLocalizedKey = btnType;

notification.Payload.Badge = iBadge;
notification.Payload.Sound = "default";
notification.Payload.AddCustom("action", sAction);
notification.Payload.AddCustom("content-available", contentAvailable);
notification.Payload.HideActionButton = true;

Util.Log("Payload is: " + notification.Payload.ToString(), true);

if (service.QueueNotification(notification))
{
// Util.Log("Success: " + token.Token, true);
}
else
Util.Log("Service Failed: " + token.Token, true);

System.Threading.Thread.Sleep(sleepBetweenNotifications);

Carl