[程式] pushsharp ios無法傳送訊息

看板C_Sharp (C#)作者 (嘎嘎)時間10年前 (2015/07/09 20:51), 編輯推噓0(004)
留言4則, 3人參與, 最新討論串1/1
不好意思想請問一下關於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://www.ptt.cc/bbs/C_Sharp/M.1436446310.A.D0E.html

07/10 16:57, , 1F
自行用openssl看一下p12有沒有過期
07/10 16:57, 1F

07/10 16:58, , 2F
有問題的話server就會直接回你error
07/10 16:58, 2F

07/10 16:59, , 3F
看一下pushsharp有沒有取error message的API
07/10 16:59, 3F

07/14 01:06, , 4F
感謝以解決憑證的部份有測試跟產品這部份沒看清楚
07/14 01:06, 4F
文章代碼(AID): #1LdcvcqE (C_Sharp)
文章代碼(AID): #1LdcvcqE (C_Sharp)