Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/330.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 推送夏普ios通知问题在几天前可以正常工作,但现在还不能正常工作_C#_Ios_Iphone_Apple Push Notifications_Pushsharp - Fatal编程技术网

C# 推送夏普ios通知问题在几天前可以正常工作,但现在还不能正常工作

C# 推送夏普ios通知问题在几天前可以正常工作,但现在还不能正常工作,c#,ios,iphone,apple-push-notifications,pushsharp,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.Queu

我无法向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”的异常**


提前感谢。

您使用的PushSharp库似乎有问题:@Tor Erik是的,您是对的。我发现这个帖子有问题,我也在github上发表了我的评论。但奇怪的是,前几天它还在工作,现在它出现了一个错误。所以,我无法从Push sharp Library或Apple中找到问题所在。@SmootherSleent我一个月前也遇到过同样的问题。是的,您使用的PushSharp库存在问题。因此,尝试从这里使用经过一些修改的更新库。所以,编译它并使用应该有效的库。@VishalSuthar我用最新版本尝试过,但仍然存在相同的问题。