作者coolqwe789 (嘎嘎)
看板C_Sharp
标题[程式] pushsharp ios无法传送讯息
时间Thu Jul 9 20:51:47 2015
不好意思想请问一下关於pashsharp的相关问题
iOS手机端都无法收到Server端送出的讯息
以下是我的程式码
{
var push = new PushBroker();
var appleCert = System.IO.File.ReadAllBytes(Server.MapPath("~/bin/External/poshsharptest_production.p12"));
push.RegisterAppleService(new ApplePushChannelSettings(true, appleCert, "password"));
push.QueueNotification(
new PushSharp.Apple.AppleNotification()
.ForDeviceToken(registrationid)
.WithAlert("Hello World!")
.WithSound("default")
);
}
是iOS凭证上的问题还是说C#程式码有问题
烦请各位帮小弟解答了谢谢
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 140.121.135.70
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/C_Sharp/M.1436446310.A.D0E.html
1F:→ sos0214: 自行用openssl看一下p12有没有过期 07/10 16:57
2F:→ ssccg: 有问题的话server就会直接回你error 07/10 16:58
3F:→ ssccg: 看一下pushsharp有没有取error message的API 07/10 16:59
4F:→ coolqwe789: 感谢以解决凭证的部份有测试跟产品这部份没看清楚 07/14 01:06