문제

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.

도움이 되었습니까?

해결책 2

다른 팁

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"));
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top