Reputation: 2226
Ive been trying to register username "NataMio" into channels but its being registered under channels like ["global","NataMio"]. but it supposed to be ["NataMio"], anybody faced this issue ? on Android version of my application its registering it as ["NataMio"].
PFInstallation *currentInstallation = [PFInstallation currentInstallation];
[currentInstallation addUniqueObject:@"NataMio" forKey:@"channels"];
// [currentInstallation setDeviceTokenFromData:deviceToken];
[currentInstallation saveInBackgroundWithBlock:^(BOOL succeeded, NSError * _Nullable error) {
// code
}];
Upvotes: 0
Views: 49
Reputation: 970
In your test, seems it contain "global" in default. So you can just set "channels" to ["NataMio"] directly.
Replace the following code:
[currentInstallation addUniqueObject:@"NataMio" forKey:@"channels"];
With:
currentInstallation.channels = @[@"NataMio"];
Upvotes: 1