question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Appsflyer on iOS prevents from others to receive the openUrl notifications

See original GitHub issue

AppsFlyerAppController.mm has the following code which restricts from others to receive the openUrl notifications

-(BOOL) application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *)options {
    NSLog(@"got openUrl: %@",url);\n
    [[AppsFlyerLib shared] handleOpenUrl:url options:options];\n
    return YES;
}

the probable fix would be to call the superclass method so that others who registered for the notification can also receive it

-(BOOL) application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary *)options {
    NSLog(@"got openUrl: %@",url);
    [super application:application openURL:url options:options];
    [[AppsFlyerLib shared] handleOpenUrl:url options:options];
    return YES;
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:26 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
s-sixteencommented, Feb 3, 2022

From looking at the code, it seems that AppsFlyer could use UnityRegisterAppDelegateListener to handle all of its notification needs. But, when you comment out IMPL_APP_CONTROLLER_SUBCLASS, AF will no longer receive the continueUserActivity callback, which is apparently used to handle OneLink deep links.

Thus, for a simple fix for gamedevs using Firebase, Facebook and AppsFlyer SDKs, I suggest commenting out IMPL_APP_CONTROLLER_SUBCLASS and calling swizzleContinueUserActivity in AppsFlyer+AppController.m

0reactions
af-margotcommented, May 25, 2022

I’m closing this issue because it has been inactive for a while. This probably means that it is not reproducible or it has been fixed in a newer version Please reopen if you still encounter this issue 😃

Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

API reference
Initialize the AppsFlyer SDK with the devKey and appID. The dev key is required for all apps and the appID is required only...
Read more >
Configure your AppsFlyer integration in your App Delegate
This guide shows how to add AppsFlyer's SDK your iOS app. You can track installs, updates, sessions and additional in-app events beyond app...
Read more >
Prevent "Would you like to open (URL)" dialog on iOS push ...
I use deep links in push notifications (using OneSignal + React Native) to open specific parts of my app. Recently my users started...
Read more >
iOS Advanced Features
CleverTap automatically tracks universal links that open your application. If you have universal (deep) links coming to your app, you can capture the...
Read more >
AppsFlyer Destination | Segment Documentation
To prevent this, you can enable the new Fallback to send IDFV when advertisingId key not present setting in your AppsFlyer destination settings....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found