-
I have already created a minimal plugin that is listening for notifications coming from android which is working great. Now I have come to the implementation of iOS. I receive the notification correctly, but when I want to notifyListeners I'm not getting the event. I tried using the hasListeners method, it states I don't have any listeners even though I have. Any help appreciated. I have been looking at this, to get inspiration: In android I had to set up a bridge to make it work in the load method, but trying to do what the push plugin does in the following link on load does only makes more errors and I don't see that I even how they use the bridge because it only sets up some kind of handler for another class, and not the current one: I'm trying to figure out swift for the first time, so might be some issues with me not reading the code well enough to see what's really going on. In the documentation, it not obvious for me how to set the bridge up correctly so I have the right instance: Setting up listener in ionic:
Typescript setting up the plugin:
In iOS AppDelegate (Receiving the notification):
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Nevermind, just had to use the Notification Center |
Beta Was this translation helpful? Give feedback.
-
How did you exactly define addListener in your customPlugin? I have a plugin which works for calling, but for the love of me I can't get data back from the custom plugin to ionic, addListener is not recognized either |
Beta Was this translation helpful? Give feedback.
Nevermind, just had to use the Notification Center