We have a problem with using @react-native-firebase/dynamic-links
package on our React Native IOS application.
Dynamic links don't work properly if we have application opened in the background. If our application is opened in the background and we type dynamic link in the browser, the application will be opened but the link is wrong: https://play.google.com/store/apps/details?id=com.myapp
However, if the application is not opened in the background dynamic link will work as expected and the link that application gets is: https://myapp.page.link/page?page=place&pageId=1001105
.
This is working correctly on Android application.
Package.json versions:
react-native: 0.61.5
@react-native-firebase/analytics: 6.2.0
@react-native-firebase/app: 6.2.0
@react-native-firebase/dynamic-links: 6.2.0
For anyone who is facing the same or similar issue, we figure out that we were missing:
- (BOOL)application:(UIApplication *)application
continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray * _Nullable))restorationHandler
{
return [RCTLinkingManager application:application continueUserActivity:userActivity
restorationHandler:restorationHandler];
}
in our ios/AppDelegate.m file.
From official React Native documentation: https://facebook.github.io/react-native/docs/linking