更新时间:2023-12-05 17:41:58
There is no way to delete a topic
directly. Not even if you have an app server. That's what I can say after going through the GCM and FCM documents.
The way I understand it, a topic
is created when there is at least 1 subscriber and it also gets automatically deleted when there are no more subscribers. So I think the way to do this is to unsubscribe all the subscribers of that topic
.
You can check more details on unsubscribing in the Managing Topic Subscriptions on the Server docs (both sites below pretty much says the same thing, but I think it's appropriate to provide a link to both of them):
Hope this helps somehow. Cheers! :)