I'm trying to subscribe to a topic in my iOS application, but keep getting the error:
<FIRMessaging/WARNING> Cannot parse topic name /topics/pets/cnlLksAxmdYPkDjEftDwZjFwvDw2_coffee. Will not subscribe.
The code I'm trying to subscribe is as follows:
FIRMessaging.messaging().subscribe(toTopic: "/topics/pets/\(name)")
where nameis the last part of the topic that you see in the error.
Does anyone know what I'm doing wrong? I have already confirmed that Firebase messages correctly receive notifications and that’s it.
source
share