Question

I've downloaded the library Push Sharp and checked through the source and I couldn't figure out how to start sending notifricatinos to APN.

As given in their documentation I've configured the certificate of Apple. But the library is too complex and couldn't figure out where to start. Even the project is loaded in my VS2010 with loads of errors. Is it something to do with VS2010?

Can someone please point me to a beginner level resource which will help me to get started with Push Sharp. I'm pulling my hair off for last couple of days. Hope someone would be able to help me out.

Was it helpful?

Solution 2

OTHER TIPS

Not sure if you're still looking, but this (hopefully) seems to be almost exactly what you're looking for: Send push notifications to iPhone with PushSharp, C#, MonoTouch, client-side and server-side

Code excerpt:

_pushBroker = new PushBroker();
var appleCert = File.ReadAllBytes("PushSharp.PushCert.Development.p12");
_pushBroker.RegisterAppleService(
  new ApplePushChannelSettings(false, appleCert, "ThePassword")); 
_pushBroker.QueueNotification(
  new AppleNotification()
  .ForDeviceToken(deviceToken)
  .WithAlert(message)
  .WithBadge(1)
  .WithSound("sound.caf"));
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top