簡體   English   中英

iOS parse.com推送錯誤

[英]iOS parse.com push error

我有一個字符串數組,我試圖保存以解析為推送通知的通道。 數組是正確的,我不知道發生了什么。 有人可以對此有所啟發嗎? 謝謝。

錯誤:

錯誤:錯誤的頻道名稱: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);
        }
    }];
}

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM