fix(messaging): iOS - fix bug where tapping a notification when the app is either in the background or closed, would not trigger any listener#267
fix(messaging): iOS - fix bug where tapping a notification when the app is either in the background or closed, would not trigger any listener#267jaco-terbraak wants to merge 1 commit intocapawesome-team:mainfrom jaco-terbraak:fix/tapping-notifications
Conversation
…he background or closed did not trigger any function call
|
@jaco-terbraak Do you use the iOS setup with swizzling disabled or enabled? |
I've tested with both |
|
@jaco-terbraak Which plugin version do you use? I just tested this recently with the latest version and it worked. So I want to find out the real problem. |
I'm using: As there's multiple people saying it works for them, I'm assuming the problem is on my end. However I've now spent multiple days tracking down the issue, and I've run out of places to look. It doesn't help though that I don't have a ton of iOS experience. It would be useful to find out what the issue is, so we can document it for others facing the same problem. |
|
This is what my |
|
@jaco-terbraak Okay, this issue should be fixed in v1.2.0: a6a0720 (listener did not retain the values). If the problem persists, could you please provide a minimal, reproducible example so i can debug the issue? |
|
@alexookah and @robingenz, thanks for bearing with me. It appears I still had Would it be worth mentioning this in the docs? Imho it's an easy mistake to make. |
|
@jaco-terbraak Glad it works now! In that case I'll close this PR now. I will try this myself and install the Capacitor Push Notification plugin in addition to this plugin to check what the real problem is. |
I agree it would make sense to mention this issue in the docs. We ran into the same issue after migrating from @capacitor/push-notifications. It took us quite some time to locate this iOS-specific issue as we also started looking at the wrong place |
|
Thanks, I just added a note to the messaging docs: 80d428d |
One would expect the notificationActionPerformed listener to be called once a notification is tapped on iOS, while the app is in the background or closed. However this does not happen. This PR fixes that.
Tested on iOS 15.4.1.
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run changeset).