Deep Links
Handle deep link URLs
Overview
Supports deep links that open the app from outside or navigate to a specific screen within the app.
| Feature | Android | iOS |
|---|---|---|
| Custom scheme deep link | ✓ | ✓ |
| App Links (HTTPS) | ✓ | ✓ (Universal Links) |
Supported Plan: Basic and above
Deep Link Scheme Structure
Default deep link schemes per build flavor:
| Flavor | Default Scheme |
|---|---|
| Basic | unveily-basic:// |
| Standard | unveily-standard:// |
| Pro | unveily-pro:// |
Change the custom scheme via the deepLinkScheme placeholder in app/build.gradle.kts.
Deep link URL examples
unveily-basic://product?id=1234
unveily-basic://user/profileHandling Incoming Deep Links
When the app is opened via a deep link, an event fires.
window.addEventListener('unveily-event', (e) => {
if (e.detail.type === 'deeplink') {
const { url } = e.detail.data;
handleDeepLink(url);
}
});
function handleDeepLink(url) {
const parsed = new URL(url);
const path = parsed.pathname; // "/product"
const params = parsed.searchParams;
if (path === '/product') {
const productId = params.get('id');
window.location.href = `/product/${productId}`;
}
}App Links (HTTPS Deep Links)
Using Android App Links, you can open the app with URLs in the format https://your-domain.com/path.
1. Deploy assetlinks.json to your server
It must be accessible at the /.well-known/assetlinks.json path.
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "com.yourcompany.app",
"sha256_cert_fingerprints": ["AA:BB:CC:DD:..."]
}
}]sha256_cert_fingerprints can be found in the App Signing section of Google Play Console.
iOS Universal Links Setup
To open the app with HTTPS URLs on iOS, you need to configure Universal Links.
1. Deploy apple-app-site-association to your server
Serve a JSON file at /.well-known/apple-app-site-association with no file extension and Content-Type: application/json.
{
"applinks": {
"apps": [],
"details": [
{
"appID": "TEAMID.com.yourcompany.app",
"paths": ["/product/*", "/user/*"]
}
]
}
}appID follows the format {Apple Team ID}.{Bundle ID}. You can find your Team ID in the Membership section of Apple Developer Console.
2. Enable Associated Domains in Xcode
In Xcode, go to Signing & Capabilities, add Associated Domains, and enter your domain.
applinks:your-domain.comServing assetlinks.json from Your Server
app.get('/.well-known/assetlinks.json', (req, res) => {
res.json([{
relation: ['delegate_permission/common.handle_all_urls'],
target: {
namespace: 'android_app',
package_name: 'com.yourcompany.app',
sha256_cert_fingerprints: [process.env.APP_CERT_FINGERPRINT]
}
}]);
});app.MapGet("/.well-known/assetlinks.json", () => new[] {
new {
relation = new[] { "delegate_permission/common.handle_all_urls" },
target = new {
@namespace = "android_app",
package_name = "com.yourcompany.app",
sha256_cert_fingerprints = new[] { Environment.GetEnvironmentVariable("APP_CERT_FINGERPRINT") }
}
}
});@GetMapping("/.well-known/assetlinks.json")
public ResponseEntity<List<Map<String, Object>>> assetLinks() {
return ResponseEntity.ok(List.of(Map.of(
"relation", List.of("delegate_permission/common.handle_all_urls"),
"target", Map.of(
"namespace", "android_app",
"package_name", "com.yourcompany.app",
"sha256_cert_fingerprints", List.of(certFingerprint)
)
)));
}<?php
if ($_SERVER['REQUEST_URI'] === '/.well-known/assetlinks.json') {
header('Content-Type: application/json');
echo json_encode([[
'relation' => ['delegate_permission/common.handle_all_urls'],
'target' => [
'namespace' => 'android_app',
'package_name' => 'com.yourcompany.app',
'sha256_cert_fingerprints' => [$_ENV['APP_CERT_FINGERPRINT']]
]
]]);
exit;
}<%
Response.ContentType = "application/json"
Dim fingerprint
fingerprint = Application("AppCertFingerprint")
Response.Write "[{""relation"":[""delegate_permission/common.handle_all_urls""]," & _
"""target"":{""namespace"":""android_app""," & _
"""package_name"":""com.yourcompany.app""," & _
"""sha256_cert_fingerprints"":[""" & fingerprint & """]}}]"
%>