appsflyer-react-native-plugin: [iOS 14.5] onDeepLink no triggered
Report
onDeepLink handler not being called in iOS 14.5
Plugin Version
“react-native”: “0.64.1” “react-native-appsflyer”: “6.2.41”
On what Platform are you having the issue?
iOS
What did you do?
I updated to Xcode 12.5 and tested opening a deep link on iOS 14.5, and it didn’t trigger onDeepLink
. The handler is working fine on iOS 14.4 and 13.5.
I tried adding timeToWaitForATTUserAuthorization: 10
, but it didn’t help.
export const initAppsFlyer = () => {
const onDeepLinkCanceller = appsFlyer.onDeepLink(() => {
try {
console.log('Deep link handler'); // <---- Never executed
} catch (e) {
console.log('');
}
});
appsFlyer.initSdk(
{
devKey: APPSFLYER_KEY,
isDebug: false,
appId: IOS_APP_ID,
onDeepLinkListener: true
},
() => console.log('Success'), // Success handler
() => console.log('Failed') // Error handler
);
return onDeepLinkCanceller;
};
What did you expect to happen?
Deep link handler
to be logged
What happened instead?
Nothing happens
Please provide any other relevant information.
I have Firebase and Facebook SDK installed, so I’m using react-native-permissions to check and request permissions to ATT.
I’d appreciate some help here. I might be missing some configuration. Thanks in advance!
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 30 (6 by maintainers)
@GoldenWings try to go to
node_modules/react-native-appsflyer/ios/AppsFlyerAttribution.m
and duplicate this line. it should look like this:if it works for you, a fix should be released in the next release
Our team is facing the same issue with the deferred link on iOS 14.5. The
onDeepLink
is never triggered in the first launch.Plugin Version:
"react-native-appsflyer": "6.2.42"
Environment:
@michalis-ligopsychakis if you are using universal-links use this if you are using uri-scheme, use this:
@ACHP It worked for us after upgrading to 6.3.50. We did face an issue where deep links were not working when iOS app was opened from a closed state.
We made a change to the file node_modules/react-native-appsflyer/ios/AppsFlyerAttribution.m b/node_modules/react-native-appsflyer/ios/AppsFlyerAttribution.m:
We needed to add this line twice: [[AppsFlyerLib shared] continueUserActivity:self.userActivity restorationHandler:self.restorationHandler]; [[AppsFlyerLib shared] continueUserActivity:self.userActivity restorationHandler:self.restorationHandler];
And it started working.