AppsFlyerSDK / appsflyer-unity-plugin

AppsFlyer Unity Plugin
MIT License
156 stars 64 forks source link

OnDeepLinkReceived does not work #252

Closed dgolovin-dev closed 1 year ago

dgolovin-dev commented 1 year ago

This example does not work: https://github.com/AppsFlyerSDK/appsflyer-unity-plugin/blob/master/docs/UnifiedDeepLink.md

I does not receive the event OnDeepLinkReceived.

Plugin version - 6.12.21 Both IOS and Android is affected.

Seems this issue is relating to https://github.com/AppsFlyerSDK/appsflyer-unity-plugin/issues/72 You just ignored this issue. Ok, I remind you about this problem.

I see the same problem in the log:

SendMessage: object serviceRoot does not have receiver for function onConversionDataSuccess!
SendMessage: object serviceRoot does not have receiver for function onDeepLinking!

You missed the listener method onDeepLinking. This method is located in the component Appsflyer. If you attach this component, to the same gameObject before startSDK, it works ok.

  void Start()
  {
    this.gameObject.AddComponent<AppsFlyer>();  // This line fixes deeplinks!
    AppsFlyer.initSDK("devkey", "appID", this);
    AppsFlyer.OnDeepLinkReceived += OnDeepLink;
    AppsFlyer.startSDK();
  }

It looks like broken interrupted refactoring. The class Appsflyer is almost entirely static, but it contains 4 non-static callbacks.

onDeepLinking
inAppResponseReceived
requestResponseReceived
unityCallBack

I guess they are not working correctly too without the Appsflyer component attached...

I hope, you will fix it this time. Regards.

af-do commented 1 year ago

Hi @dgolovin-dev, Thank you for reaching out to us. Indeed, attaching AppsFlyer.cs is a requirement for the deep linking callback to properly work. Please take a look at Implementation step number 1.

I have looked into the issue you have linked, and I don't think it is related to this one as the old issue is talking about a generated deep link from our generateUserInviteLink API that gets an 'Authentication failed' message and not a function receiver issue.

If you are certain there is an issue surrounding deep linking and/or the unity callbacks, please submit a ticket to our support team at support@appsflyer.com. When submitting the ticket, please specify:

✅ your AppsFlyer sign-up (account) email ✅ app ID ✅ reproduction steps ✅ logs ✅ code snippets ✅ and any additional relevant information.

dgolovin-dev commented 1 year ago

https://github.com/AppsFlyerSDK/appsflyer-unity-plugin/issues/198 - the same problem

dgolovin-dev commented 1 year ago

The standard configuration prefab does not contain this script too...

image

dgolovin-dev commented 1 year ago

Could you explain, why do you not attach this component by default? There are some side effects?