0

嗨香港专业教育学院一直与这个重大问题因某种原因不能和工作原因。APNS设备注册蔚蓝的移动服务IOS

林登记为设备注册:

- (void) filterResponse: (NSHTTPURLResponse *) response 
       forData: (NSData *) data 
       withError: (NSError *) error 
      forRequest:(NSURLRequest *) request 
       onNext:(MSFilterNextBlock) onNext 
      onResponse: (MSFilterResponseBlock) onResponse{ 
**code omitted ** 
} 

我回来在的回复::

{ URL: https://hiddenAppName-mobile-app.azure-mobile.net/push/registrations%3FdeviceId=0F165A3BD554E4F4FCB8E412B537F2FE10B08FE1E2D1C168AE9EBE8A6DC15CA9&platform=apns } { status code: 200, headers { "Cache-Control" = "no-cache"; "Content-Encoding" = gzip; "Content-Length" = 483; "Content-Type" = "application/json; charset=utf-8"; Date = "Thu, 03 Sep 2015 21:11:01 GMT"; Expires = 0; Pragma = "no-cache"; Server = "Microsoft-IIS/8.0"; "Set-Cookie" = "ARRAffinity=6400fd48b4ba8e8bea4813afbd16c1ff61bacfd0d259c7c36e529f742a8de958;Path=/;Domain=hiddenAppName-mobile-app.azure-mobile.net"; Vary = "Accept-Encoding"; "X-Powered-By" = "ASP.NET"; } }

- (void)application:(UIApplication *)application 

didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { 
MSClient *client = self.authService.client; 
[client.push registerNativeWithDeviceToken:deviceToken tags:nil completion:^(NSError *error) { 
if (error != nil) { 
NSLog(@"Error registering for notifications: %@", error); 
} 
}]; 
} 
在滤波器响应的方法,看起来像这样

数据为:

[{"platform":"apns","deviceId":"0F165A3BD554E4F4FCB8E412B537F2FE10B08FE1E2D1C168AE9EBE8A6DC15CA9","registrationId":"3293417219461121655-5315545091225715647-20","tags":["CCE40A1696B14DADA2F005D554F970F6"],"templateName":null,"templateBody":null,"headers":{},"expiration":"2015-11-14T22:29:07.896Z"},{"platform":"apns","deviceId":"0F165A3BD554E4F4FCB8E412B537F2FE10B08FE1E2D1C168AE9EBE8A6DC15CA9","registrationId":"6230917652908957715-607108047627745508-20","tags":["13E1958EDF1D43AD8B5D9F61CF1203C8"],"templateName":null,"templateBody":null,"headers":{},"expiration":"2015-11-17T20:58:32.505Z"}]

当onResponse回调从该filterResponse方法(上图)的应用程序崩溃了几个电话下来[MSLocalStorage commitDefaultsWithStorageVersion] 与此错误称为:

Property list invalid for format: 200 (property list dictionaries may only have keys which are CFStrings, not 'CFNull') 2015-09-03 22:18:58.778 hiddenAppName[2399:1160388] Attempt to set a non-property-list object { "" = "6230917652908957715-607108047627745508-20"; } as an NSUserDefaults/CFPreferences value for key hiddenAppName-mobile-app.azure-mobile.net-registrations 2015-09-03 22:18:58.779 hiddenAppName[2399:1160388] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Attempt to insert non-property list object { "" = "6230917652908957715-607108047627745508-20"; } for key hiddenAppName-mobile-app.azure-mobile.net-registrations' * First throw call stack:

(0x1829e022c 0x1946ac0e4 0x1829e016c 0x182a19fb4 0x18296c870 0x18296b850 0x182a1a2b0 0x182a19848 0x182a1d0d8 0x18380a960 0x10012ec00 0x10012e748 0x10011b78c 0x100121474 0x10007bce4 0x10007b734 0x10011ee7c 0x18245d1e8 0x18245d178 0x18245d2f4 0x18232fdfc 0x1823fa120 0x18231befc 0x1828c097c 0x18231bda8 0x18231bc5c 0x18231ba88 0x182997f8c 0x182997230 0x1829952e0 0x1828c0f74 0x18c31b6fc 0x1874c2d94 0x10001762c 0x194d56a08)

libc++abi.dylib: terminating with uncaught exception of type NSException

任何想法,为什么这是任何人吗?

回答

0

处理空模板名称时出现了一个错误,现在已经在2.2.1中解决了这个问题。如果你更新到该版本,你应该很好去。 (FIX:https://github.com/Azure/azure-mobile-services/commit/9347390

+0

你好非常感谢你为你的答复!由于改变它已停止崩溃,但现在我没有收到推送通知。我在服务器上有一个生产证书(我试过沙盒和开发证书),并注册设备(事件虽然一次推后消失)移动服务表示消息发送给apns,但它永远不会到达了。除了升级之外,还有更多吗?它是否应该发回模板?我认为在某些时候我收到了模板,因为它在三天或四天内没有崩溃,然后突然开始。 – user3364602

+0

它可能是一个证书问题我要一步一步地经历整个过程,但我不明白是什么改变.....它非常令人沮丧 – user3364602