Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeepLink initially opens app to a non-existing screen (iOS only) #572

Open
BennyG93 opened this issue Aug 23, 2024 · 5 comments
Open

DeepLink initially opens app to a non-existing screen (iOS only) #572

BennyG93 opened this issue Aug 23, 2024 · 5 comments
Labels

Comments

@BennyG93
Copy link

Report

Plugin Version

"expo": "~50.0.17",
"react": "18.2.0",
"react-native": "0.73.4",
"react-native-appsflyer": "^6.14.3",

On what Platform are you having the issue?

iOS

What did you do?

We generate a branded OneLink link either manually in the AppsFlyer dashboard or programatically using generateInviteLink().

It will look something like: https://invite.pickem.social/WGMu/j8ekkwge

We share that link with to test the deep linking feature of OneLink.

What did you expect to happen?

When the app is already installed, we expect the app to be automatically opened, the deep link to be resolved, and then our custom logic is executed based on the data retrieved from the query params.

What happened instead?

On Android devices this works exactly as expected, the app initially opens to the home screen, the deep link is resolved along with the query param data, and we navigate the user to the expected location based on the data.

On iOS, when the app is launched from the link, it tried to open to a page that matches the URI in the OneLink URL, for example /WGMu/j8ekkwge

Screenshot 2024-08-22 at 19 36 04

Please provide any other relevant information.

When reviewing the logs of the device, we can see the data from the params in the link is available, but because the app is initially opened to this non-existing page, our code is not executed, and we cannot navigate the user to correct location.

We noticed that the data from the OneLink link is resolved differently when comparing the logs of a Android device and iOS device

iOS logs:
image

Android Logs:
image (1)

The main difference (I think) is that the "link" value in android is pickem:// which results in the app opening to the home page initially, but on iOS the "link" value is the full https:// url which results in the app opening to the path in the URI .

Copy link

👋 Hi @BennyG93 and Thank you for reaching out to us.
In order for us to provide optimal support, please submit a ticket to our support team at [email protected].
When submitting the ticket, please specify:

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

@idolago94
Copy link

idolago94 commented Nov 10, 2024

The same issue.
@BennyG93 Have you found a solution?

@BennyG93
Copy link
Author

Hey @idolago94, I believe we know the issue, although we have not had the time to implement it ourselves.

On this Expo page about Customizing links, they state the following:

"Expo Router will always evaluate a URL with the assumption that the URL targets a specific page within the app."

So we think it must be expo itself reading the URL and by default trying to navigate to a screen at the location defined by the URI.

On this same page, they suggest some solutions, but we haven't tried any of them yet, hope that helps!

@idolago94
Copy link

Hey @idolago94, I believe we know the issue, although we have not had the time to implement it ourselves.

On this Expo page about Customizing links, they state the following:

"Expo Router will always evaluate a URL with the assumption that the URL targets a specific page within the app."

So we think it must be expo itself reading the URL and by default trying to navigate to a screen at the location defined by the URI.

On this same page, they suggest some solutions, but we haven't tried any of them yet, hope that helps!

The link Ben shared here should work. The issue is that AppsFlyer does not provide an option to retrieve the link’s information using a function that takes the link as input and returns its data. Instead, they only provide the onDeepLink event. However, this is not useful in this case because Expo provides a function that is supposed to return the intended path.

It would be very helpful if they added such a capability to the SDK or even via an API.

@Georg7
Copy link

Georg7 commented Nov 27, 2024

@idolago94 Does that mean that there is no way to generate a OneLink URL that goes to a specific route?

Our issues is the same: The deeplink ends up on my-app://123/ route - 123 is our OneLInk template id. Something really seems off here. We've updated the fallback route in the template settings and set the same fallback route in the af_dp parameter when generating the link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants