Ios 解析的奇怪问题
我的应用程序运行良好。但从最后一个小时开始它就崩溃了给我一个日志:Ios 解析的奇怪问题,ios,objective-c,parse-platform,push-notification,xcode6,Ios,Objective C,Parse Platform,Push Notification,Xcode6,我的应用程序运行良好。但从最后一个小时开始它就崩溃了给我一个日志: Channel name must start with a letter: 2 (Code: 112, Version: 1.7.2) 我正在使用解析推送通知服务和以下代码订阅频道: NSString *str =[[NSUserDefaults standardUserDefaults]objectForKey:@"userEmail"]; //asd@lop.com str = [str stringByR
Channel name must start with a letter: 2 (Code: 112, Version: 1.7.2)
我正在使用解析推送通知服务和以下代码订阅频道:
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];
我什么都没变。我检查了我的代码的早期版本,它们也在同一点崩溃。什么问题我无法解决。您的代码似乎很好,根据您所说的,它曾经工作过,我认为您应该尝试卸载/重新安装设备上的应用程序,然后重试 什么是str?这是非常必要的。@Fogmeister我更新了我的问题,如果你把NSLog@%@,str;就在addUniqueObject行之前?@Fogmeister如果我像这样输入电子邮件stack@gmail.com然后输出将是stack gmail Com,这不是我所要求的。输入日志代码。使应用程序崩溃。让我知道日志声明是怎么说的。