Nata Mio Nata Mio - 1 year ago 117
Objective-C Question

Parse saves unique Object wrong

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


Answer Source

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"];


 currentInstallation.channels = @[@"NataMio"];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download