在使用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, press return to exit...有什么想法吗?
当您插入电话时,我使用DeviceToken作为iTunes中显示的长UID。证书已按照PushSharp维基上的说明导出(沙盒)。
发布于 2013-02-13 00:40:00
您使用的不是设备令牌。设备令牌为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
}https://stackoverflow.com/questions/14837015
复制相似问题