我一直在尝试将用户名“NataMio”注册到 channel 中,但它是在 ["global","NataMio"] 等 channel 下注册的。但它应该是 ["NataMio"],有人遇到过这个问题吗?在我的应用程序的 Android 版本上,它注册为 ["NataMio"]。
PFInstallation *currentInstallation = [PFInstallation currentInstallation];
[currentInstallation addUniqueObject:@"NataMio" forKey:@"channels"];
// [currentInstallation setDeviceTokenFromData:deviceToken];
[currentInstallation saveInBackgroundWithBlock:^(BOOL succeeded, NSError * _Nullable error) {
// code
}];
最佳答案
在您的测试中,它似乎默认包含“global”。所以你可以直接将“ channel ”设置为[“NataMio”]。
替换以下代码:
[currentInstallation addUniqueObject:@"NataMio" forKey:@"channels"];
与:
currentInstallation.channels = @[@"NataMio"];
关于ios - 解析保存唯一对象错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37679282/