I'm having trouble subscribing to an audience from my iOS app for Push Notifications. I've created several Audiences from the dashboard on Back4App. But I don't know how to subscribe or unsubscribe from my app in Xcode.
My problem is that whether they're subscribed or not; the device is always getting the notification
This is how I'm subscribing:
PFInstallation *currentInstallation = [PFInstallation currentInstallation];
[currentInstallation addUniqueObject:@"General" forKey:@"channels"];
[currentInstallation addUniqueObject:@"Events" forKey:@"channels"];
[currentInstallation saveInBackground];
And unsubscribing:
[currentInstallation removeObject:announcementTitles[indexPath.row] forKey:@"channels"];
But whichever way, when I send a notification to a specific audience from the dashboard, it sends to everyone.
Thanks