Parse的奇怪问题

时间:2015-07-14 09:48:05

标签: ios objective-c parse-platform push-notification xcode6

我的应用程序运行正常。但是从最后一小时开始它就崩溃了,给我一个日志:

Channel name must start with a letter: 2 (Code: 112, Version: 1.7.2)

我正在使用Parse推送通知服务并使用以下代码订阅频道:

    NSString *str =[[NSUserDefaults  standardUserDefaults]objectForKey:@"userEmail"]; //asd@lop.com


str = [str stringByReplacingOccurrencesOfString:@"@"
                                     withString:@"-"];
str = [str stringByReplacingOccurrencesOfString:@"."
                                     withString:@"-"];



 PFInstallation *currentInstallation = [PFInstallation currentInstallation];

[currentInstallation addUniqueObject:str forKey:@"channels"];
currentInstallation[@"user"] = [PFUser currentUser]; //app crashes here

[currentInstallation saveInBackground];

我没有改变任何事情。我检查了我的代码的早期版本,它们也在同一时间崩溃。我无法解决的问题是什么。

1 个答案:

答案 0 :(得分:0)

您的代码看起来很好,根据您所说的它曾经工作我认为您应该尝试在您的设备上卸载/重新安装该应用并重试。