在几天之前推动尖锐的ios通知问题,但现在还没有工作

时间:2015-04-28 10:55:27

标签: c# ios iphone apple-push-notifications pushsharp

我有向IOS发送通知的问题。

我使用以下代码向IOS设备发送通知:

var appleCert = File.ReadAllBytes(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "../../../Resources/xxxxxxxxx-2015.p12"));
push.RegisterAppleService(new ApplePushChannelSettings(appleCert, "xxxxxxxx"));
push.QueueNotification(new AppleNotification()
                          .ForDeviceToken("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
                          .WithAlert("Hello World!")
                          .WithBadge(7)
                          .WithSound("sound.caf"));

我过去做过同样的代码,但是现在它给我的错误如下

  

失败:PushSharp.Apple.ApplePushService - >类型为' PushSharp.Apple.NotificationFailureException'被抛出**

提前致谢。

0 个答案:

没有答案