Tuesday, October 6, 2026
HomeiOS Developmentreact native - Expo app on iOS doesn't recieve the right url...

react native – Expo app on iOS doesn’t recieve the right url (firebase dynamic hyperlinks)

[ad_1]

I am engaged on an Expo app that ought to be capable of open to a selected display when clicking on a hyperlink. I am utilizing Firebase dynamic hyperlinks for this.

I can first state that every little thing works for android.

I’ve created a URL prefix on Firebase, lets name it https://take a look at.web page.hyperlink.

I’ve created a dynamic hyperlink for this prefix, lets name it https://take a look at.web page.hyperlink/gY5Z. When clicking on this hyperlink it ought to open the app and switch to https://myapp.com/about so my app can navigate to the about display.

I exploit this code in App.js to get the url and present it in an alert:

const url = useURL();

useEffect(() => {
  Alert.alert("URL", url);
}, [url]);

On android, when clicking the hyperlink, the alert tells me the url I get is https://myapp.com/about, and it navigates to the about display.

On iOS, clicking on the hyperlink opens the app, however the alert tells me the url is https://take a look at.web page.hyperlink/gY5Z, which is unsuitable. The url ought to flip into https://myapp.com/about similar to it does on android.

That is how my https://take a look at.web page.hyperlink/.well-known/apple-app-site-association appears like. I have never made this myself, it was generated by Firebase.
The Staff ID I received from the Apple developer crew, and the bundleIdentifier is identical as in app.json.

{
  "applinks":
  {
    "apps":[],
    "particulars":
    [
      {
        "appID":"<TeamID>.<bundleIdentifier>",
        "paths":["NOT /_/*","/*"]
      }
    ]
  }
}

In my app.json I’ve this in expo.ios

"ios": {
  "icon": "./belongings/launch-icon-ios.png",
  "supportsTablet": true,
  "bundleIdentifier": "<bundleIdentifier>",
  "infoPlist": {
    "NSRemindersUsageDescription": "This app makes use of the calendar"
  },
  "config": {
    "googleMapsApiKey": "<Google maps api key>"
  },
  "associatedDomains": ["applinks:test.page.link"]
},

The issue is the half the place I click on the hyperlink https://take a look at.web page.hyperlink/gY5Z and enter the app, however the url I get is https://take a look at.web page.hyperlink/gY5Z as a substitute of https://myapp.com/about.

My finest guess is the issue lies within the file positioned at https://take a look at.web page.hyperlink/.well-known/apple-app-site-association as seen above.
Or the issue lies within the ios a part of app.json, most likely on this half in that case
"associatedDomains": ["applinks:test.page.link"]

However I can not determine it out, and hoped somebody right here might need an concept.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments