【发布时间】:2016-01-02 07:06:48
【问题描述】:
我正在尝试使用 pushsharp nuget 向 IOS APN 发送推送。
push.RegisterAppleService(new ApplePushChannelSettings(false, applecert, ""), serviceSettings);
AppleNotification notif = new AppleNotification().ForDeviceToken(deviceToken)
.WithAlert(message)
.WithBadge(1)
.WithSound("default");
push.QueueNotification(notif);
//wait for queue to finish
push.StopAllServices(true);
它曾经工作过......现在我不断收到这个异常:
您已选择开发/沙盒(非生产)服务器,但 您的证书似乎不是开发/沙箱 证书!请检查以确保您拥有正确的证书!
请帮帮我。
【问题讨论】:
-
您是在测试开发模式还是生产模式?
-
您的代码似乎没问题。我敢打赌,你的证书一定有问题。尝试使用密码重新生成它。我有两个证书(生产和开发),但我告诉 Pushsharp 两者都是生产。沙盒有一些问题...