알림을 전송하지 않습니다PushSharp 내가 간단한 코드를 가지고있다
PushBroker pushBroker = new PushBroker();
string path = HttpContext.Current.Server.MapPath("~/" + AppSettings.CertificatePath);
var appleCert = File.ReadAllBytes(path);
pushBroker.RegisterAppleService(
new ApplePushChannelSettings(AppSettings.IsProductionPushNotificationServer,
appleCert,
AppSettings.CertificatePassword));
var notification = new AppleNotification().ForDeviceToken(deviceToken.TrimStart('<').TrimEnd('>'))
.WithBadge(unviewedInvitationCount);
pushBroker.QueueNotification(notification);
나는 각각 샌드 박스와 개발 및 생산 sertificates 및 생산 서버를 사용하려고합니다. 그러나 아무 일도 일어나지 않습니다. 클라이언트 쪽에서 푸시 알림을받을 수 있습니다. 무엇이 잘못 되었나요? 미리 감사드립니다.
업데이트 : 나는 이벤트에 가입
.
OnNotificationFailed이 오류에 대해 나에게 말한다 :
{APNS NotificationFailureException -> 5 : Invalid token size -> {"aps":{"badge":1}}}
내가 <에 내 장치 토큰을 포장하는 경우 ...> 나는 다른 오류가 나타납니다
이{APNS NotificationFailureException -> 8 : Invalid token -> {"aps":{"badge":1}}}
감사합니다. – Neshta
여러분을 환영합니다! – Eran
그것은 나를 위해 일했다. "공백"이 나를위한 문제였습니다. – Raghav