0

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

  • Can you please add a print screen of the audience you are trying to send to and everybody is receiving? Channel is different from audience. Your code is correctly adding a channel to a installation. Now you have to create an audience that filters for this specific installation and then send to this audience. – Davi Macêdo Nov 28 '17 at 23:06
  • @DaviMacêdo I sent and email to the Back4app team, and they told me the Audience feature on the dashboard is broken currently. However, I was able to successfully send notifications to specific channels through my app instead of through the dashboard. – Ben Giannis Nov 29 '17 at 23:51
  • It should be working now. In the case you try again and it still not working, let me know. – Davi Macêdo Nov 30 '17 at 20:37

0 Answers0