Push notification PushSharp通知错误
在使用PushSharp时,我不断遇到以下错误:Push notification PushSharp通知错误,push-notification,apple-push-notifications,pushsharp,Push Notification,Apple Push Notifications,Pushsharp,在使用PushSharp时,我不断遇到以下错误: Waiting for Queue to Finish... Failure: Apple -> Exception of type 'PushSharp.Apple.NotificationFailureException' was thrown. -> {"aps":{"alert":"Alert Text From .NET!","badge":7,"sound":"default"}} Queue Finished, pres
Waiting for Queue to Finish...
Failure: Apple -> Exception of type 'PushSharp.Apple.NotificationFailureException' was thrown. -> {"aps":{"alert":"Alert Text From .NET!","badge":7,"sound":"default"}}
Queue Finished, press return to exit...
有什么想法吗?我使用
DeviceToken
作为您插入手机时iTunes中显示的长UID。证书已按照PushSharp Wiki上的说明导出(沙箱)。您使用的不是设备令牌。设备令牌为32字节(也可以表示为64个十六进制字符的字符串)。当你的iOS应用程序注册推送通知时,它会从苹果获得
- (void)applicationDidFinishLaunching:(UIApplication *)app {
// other setup tasks here....
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
}
// Delegation methods
- (void)application:(UIApplication *)app didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)devToken {
const void *devTokenBytes = [devToken bytes];
self.registered = YES;
[self sendProviderDeviceToken:devTokenBytes]; // custom method
}