c# - While queueing notifications with PushSharp nothing happens at all -


i tried send apple push notification pushsharp library that:

public class push {     private readonly pushbroker _push;      private static push _instance;      public static push instance     {         { return _instance ?? (_instance = new push()); }     }      public push()     {         _push = new pushbroker();         _push.onnotificationsent += new notificationsentdelegate(_push_onnotificationsent);         _push.onnotificationfailed += new notificationfaileddelegate(_push_onnotificationfailed);         _push.onserviceexception += new serviceexceptiondelegate(_push_onserviceexception);         _push.onchannelcreated += new channelcreateddelegate(_push_onchannelcreated);         _push.onchanneldestroyed += new channeldestroyeddelegate(_push_onchanneldestroyed);         _push.onchannelexception += new channelexceptiondelegate(_push_onchannelexception);         _push.onnotificationrequeue += new notificationrequeuedelegate(_push_onnotificationrequeue);         _push.registerappleservice(new applepushchannelsettings(false, file.readallbytes(@"c:\pathtocertificate\name.p12"), "***"), "myappid", new pushservicesettings()         {             channels = 1,             autoscalechannels = false         });     }      void _push_onnotificationrequeue(object sender, notificationrequeueeventargs e)     {         debug.print("requeue");     }      void _push_onchannelexception(object sender, ipushchannel pushchannel, exception error)     {         debug.print("channel exception");     }      void _push_onchanneldestroyed(object sender)     {         debug.print("channel destroyed");     }      void _push_onchannelcreated(object sender, ipushchannel pushchannel)     {         debug.print("channel created");     }      void _push_onserviceexception(object sender, system.exception error)     {         debug.print("service exception");     }      void _push_onnotificationfailed(object sender, inotification notification, system.exception error)     {         debug.print("failed");     }      void _push_onnotificationsent(object sender, inotification notification)     {         debug.print("sent");     }      public void send(notification notification)     {         _push.queuenotification(notification);         _push.stopallservices("biz.sintek.rotapost", true);     }      public void sendapplenotification(string devicetoken, string text)     {         send(new applenotification()             .fordevicetoken(devicetoken)             .withalert(text)             .withsound("default"));     } } 

i'm calling sendapplenotification method. returns in no time no exceptions throwed, no events called, no notifications sent , no notifications received. using developer push certificate converted .p12 format. double checked provisioning profile.

queuenotification method of pushbroker class generic. using generic type parameter identify service use notification send.

solution pass new applenotification()... directly queuenotification


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -