【问题标题】:iOS parse.com push erroriOS parse.com 推送错误
【发布时间】:2013-02-04 23:21:43
【问题描述】:

我有一个字符串数组,我正在尝试保存以解析为推送通知的通道。数组是正确的,我不知道发生了什么。有人可以对此有所了解吗?谢谢。

错误:

错误:错误的通道名称:TestString123(代码:112,版本:1.1.30)

代码:

- (void)saveSelectedDepartmentsToParse:(NSMutableDictionary *)dictionary {

    NSArray *array = [dictionary allKeysForObject:@"YES"];

    NSLog(@"Array = %@", array);

    PFInstallation *currentInstallation = [PFInstallation currentInstallation];

    [currentInstallation addObjectsFromArray:array forKey:@"channels"];
    [currentInstallation saveInBackgroundWithBlock:^(BOOL succeeded, NSError *error) {

        if (error == nil) {

            NSLog(@"Parse Save Succeeded");
        }
        else {

            NSLog(@"Parse Save Failed, %@", error.localizedDescription);
        }
    }];
}

【问题讨论】:

    标签: ios arrays dictionary error-handling parse-platform


    【解决方案1】:

    原因是 Parse 不接受通道中的空格或任何特殊字符。删除所有空格和特殊字符后,操作成功。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-06-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-27
      • 1970-01-01
      相关资源
      最近更新 更多