I implemented universal deep links in my React Native app:
Linking.ts:
const config = {
screens: {
details: {
path: "details",
},
menu: {
path: "menu",
},
orders: {
path: "orders",
},
share: {
path: "share",
},
},
}
export const linking = {
prefixes: ["https://getdad.co.uk", "dad://"],
config,
}
apple-app-site-association:
{
"applinks": {
"apps": [],
"details": [{
"appID": "<TEAMID>.io.feastly.dad",
"paths": [
"/details",
"/menu",
"/order",
"/share"
]
}]
}
}
They work fine on the Simulator (direct to the correct page, etc), but on a real device they only direct to the app (ie they open the app normally, they don't link to a specific screen)
I tested it in multiple ways on the Simulator (eg safari, address book, from command line)
Any ideas?
Add http://
and the bare url to your linking file. https
goes to safari on the iphone, don't know why, don't care, this works:
export const linking = {
prefixes: [
"https://getdad.co.uk",
"http://getdad.co.uk",
"getdad.co.uk",
"dad://",
],
config,
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.