Click here to Skip to main content
15,896,726 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have implement the below code for sending push notification to ios from my asp.net c# code , i am not getting any error but same time i didn't get any notification on ios device. i am using push sharp library version 2.0.0.4.

What I have tried:

C#
//Create our push services broker
var push = new PushBroker();
push.OnNotificationSent += NotificationSent;
push.OnChannelException += ChannelException;
push.OnServiceException += ServiceException;
push.OnNotificationFailed += NotificationFailed;
push.OnDeviceSubscriptionExpired += DeviceSubscriptionExpired;
push.OnDeviceSubscriptionChanged += DeviceSubscriptionChanged;
push.OnChannelCreated += ChannelCreated;
push.OnChannelDestroyed += ChannelDestroyed;
//Registering the Apple Service and sending an iOS Notification
var appleCert = File.ReadAllBytes("PushnotificationDev.p12");
push.RegisterAppleService(new ApplePushChannelSettings(appleCert, "123456"));
push.QueueNotification(new AppleNotification()
                           .ForDeviceToken("0755ac6c555e9b9e819b15772e6bcb11d64c659d331a28cf7674050a20fa885i")
                           .WithAlert("Hello World!")) ;
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900