0

我正在尝试在多个 Parse 通道中注册一个设备,但它不起作用并且不知道我做错了什么。

在我的表格中,Parse 没有显示设备在这些频道中

这在您按下按钮时执行。

[currentInstallation addUniqueObject:@"CocaCola" forKey:@"channels"];
[currentInstallation addUniqueObject:@"Seur" forKey:@"channels"];
[currentInstallation addUniqueObject:@"ADIF" forKey:@"channels"];
[currentInstallation saveInBackground];
4

1 回答 1

0

尝试以下操作:

PFInstallation *currentInstallation = [PFInstallation currentInstallation];
currentInstallation.channels = @[ @"CocaCola", @"Seur", @"ADIF" ];
[currentInstallation saveInBackground];

或者,考虑使用subscribeToChannelInBackground

subscribeToChannelInBackground:

将设备异步订阅到推送通知通道。

+ (void)subscribeToChannelInBackground:(NSString *)channel

于 2015-10-05T18:16:57.713 回答