[FIX] Reply and deep link from push notifications not working on iOS #4550
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
Reply issue
We migrate AppDelegate to Objective-C++ on #4316, which is documented here https://reactnative.dev/docs/next/new-architecture-app-intro#ios---use-objective-c-mm-extension
However, we used import the swift bridging header on AppDelegate and we removed it by mistake.
Since there is no compatibility between Swift and Objective-C++, we had to patch react-native-notifications and do a workaround on Expo to stop importing using the Swift way (
@import module
) and make it import using obj-c way (<module/module.h>
).References:
Deep link issue
We worked on a fix on #4428, but that fixed only deep link with URL and not with a push notification tap.
In order to fix it, I added
startMonitorNotifications
from RNN again, which was also removed by mistake on the Obj-C++ migration.Side note
We could also fix this by bringing back Obj-C to AppDelegate (
.m
rather than.mm
), but that would be a shitty workaround, since we'd have to deal with this error in the future in order to enable the RN's New Architecture (Fabric).Issue(s)
How to test or reproduce
from cold boot
resume
reply
reply from cold boot
Screenshots
Types of changes
Checklist
Further comments