iOS 및 Android의 유니버설 링크(HTTPS 딥 링크)
웹 서버에 Apple App Site Association 및 Android App Links 파일을 설정하고, 앱에서 자격 및 인텐트 필터를 구성한 다음 딥 링크가 처음부터 끝까지 작동하는지 확인합니다.
iOS 및 Android의 유니버설 링크(HTTPS 딥 링크)은(는) CoddyKit의 무료 React Native Academy 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 React Native Academy 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. React Native Academy 강의에는 총 4개의 강의가 포함되어 있습니다.
이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.
Why Universal Links Over Custom Schemes
Universal links use real HTTPS URLs to open your app. When a user taps https://myapp.com/profile/123, iOS or Android checks if your app is installed and capable of handling that URL domain. If yes, it opens your app directly — otherwise it falls back to the website in the browser.
This solves two problems with custom schemes: (1) fallback — if your app isn't installed, the user still sees a working web page; (2) security — only your app can claim your domain because the OS verifies ownership through server-hosted files.
How Universal Links Work
When your app is installed, both iOS and Android download a verification file from your server to confirm that your app is authorized to handle URLs on your domain. This verification happens once at install time (and periodically thereafter). The files are served at well-known URLs on your HTTPS domain.
When a user taps an HTTPS link to your domain, the OS checks its cached verification and routes to your app instead of Safari/Chrome — no browser, no redirect, instant in-app navigation.
// iOS: https://myapp.com/.well-known/apple-app-site-association
// Android: https://myapp.com/.well-known/assetlinks.json
// Both files must be:
// - Served over HTTPS
// - Accessible without redirects
// - Correct Content-Type
// - Cached but refreshableApple App Site Association (AASA) File
The Apple App Site Association file (AASA) is a JSON file hosted at https://yourdomain.com/.well-known/apple-app-site-association. It specifies which paths on your domain should open the app versus open in Safari. The appIDs field contains your Team ID + Bundle ID.
Paths use wildcards: /profile/* matches any profile URL. Paths can be excluded with a NOT prefix. A well-configured AASA is specific — only deep-link paths that actually exist in your app should be listed.
// https://myapp.com/.well-known/apple-app-site-association
{
'applinks': {
'apps': [],
'details': [
{
'appIDs': ['TEAMID1234.com.example.myapp'],
'components': [
{ '/': '/profile/*' },
{ '/': '/product/*' },
{ '/': '/settings' },
{ '/': '/order/*' },
{ '/': '/404', 'exclude': true }
]
}
]
}
}Android App Links: assetlinks.json
Android uses Digital Asset Links verified via https://yourdomain.com/.well-known/assetlinks.json. This file lists your app's package name and the SHA256 fingerprint of your signing certificate. Android downloads and caches this file at install time to verify ownership.
The SHA256 fingerprint can be obtained from your keystore using the keytool command. In Expo/EAS Build the fingerprint is shown in the build output. The fingerprint is specific to your signing certificate — debug and release builds have different fingerprints.
// https://myapp.com/.well-known/assetlinks.json
[
{
'relation': ['delegate_permission/common.handle_all_urls'],
'target': {
'namespace': 'android_app',
'package_name': 'com.example.myapp',
'sha256_cert_fingerprints': [
'AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99'
]
}
}
]Configuring iOS Entitlements
In addition to the AASA file, your iOS app must declare the Associated Domains entitlement. In Expo managed workflow, add the associatedDomains key under expo.ios in app.json. The format is applinks:yourdomain.com.
After adding this, rebuild the native app with EAS Build. The entitlement gets embedded in the app's signing profile. Without the entitlement, iOS will not attempt to verify the AASA file even if it's correctly hosted.
// app.json
{
'expo': {
'ios': {
'bundleIdentifier': 'com.example.myapp',
'associatedDomains': [
'applinks:myapp.com',
'applinks:www.myapp.com'
]
}
}
}Configuring Android Intent Filters
Android requires an intent-filter in AndroidManifest.xml for App Links. In Expo managed workflow, the intentFilters key in app.json under expo.android adds this configuration. The autoVerify: true flag enables the App Links verification process.
The intent-filter declares the scheme as https, the host as your domain, and the path pattern to match. At install time Android downloads the assetlinks.json file to verify ownership.
// app.json
{
'expo': {
'android': {
'package': 'com.example.myapp',
'intentFilters': [
{
'action': 'VIEW',
'autoVerify': true,
'data': [
{ 'scheme': 'https', 'host': 'myapp.com' },
{ 'scheme': 'https', 'host': 'www.myapp.com' }
],
'category': ['BROWSABLE', 'DEFAULT']
}
]
}
}
}Hosting Requirements for the Verification Files
Both verification files have strict hosting requirements that cause silent failures if not met:
- Must be served over HTTPS (not HTTP)
- Must return 200 status (not 301 redirect)
- Must have the correct Content-Type:
application/jsonfor both - Must be accessible without authentication — no login required
- Must use a valid TLS certificate (not self-signed)
Test with curl to verify: curl -I https://myapp.com/.well-known/apple-app-site-association
# Verify AASA is accessible:
curl -I https://myapp.com/.well-known/apple-app-site-association
# Expect: HTTP/2 200, content-type: application/json
# Verify assetlinks:
curl -I https://myapp.com/.well-known/assetlinks.json
# Expect: HTTP/2 200, content-type: application/json
# Verify content:
curl https://myapp.com/.well-known/assetlinks.jsonAdding Universal Links to React Navigation
Add your HTTPS domain to the prefixes array in your React Navigation linking config alongside your custom scheme. This lets the navigation library handle both types of URLs with the same screen map, with no additional routing logic needed.
The screen path patterns are shared — the same path after the prefix maps to the same screen regardless of whether the link came from a custom scheme or an HTTPS universal link.
import * as ExpoLinking from 'expo-linking';
const linking = {
prefixes: [
ExpoLinking.createURL('/'), // Expo Go + production custom scheme
'https://myapp.com', // Universal links
'https://www.myapp.com',
],
config: {
screens: {
Home: '',
Profile: 'profile/:userId',
Product: 'product/:productId',
},
},
};Debugging Universal Links
Universal link issues are harder to debug than custom scheme issues because verification is done by the OS at install time. Common problems and fixes:
- iOS: link opens Safari instead of app — AASA file not found, wrong format, or Associated Domains entitlement missing. Re-install the app after fixing.
- Android: link opens Chrome — assetlinks.json wrong fingerprint or autoVerify not set. Check with the
adbverification command. - Both: after host changes — OS caches the file; uninstall and reinstall to force re-verification.
# Verify Android App Links:
adb shell pm get-app-link com.example.myapp
# Expected: verified
# Re-verify on device:
adb shell pm verify-app-links com.example.myapp
# iOS: check in Settings > Privacy > Universal Links
# or use Apple's AASA validator:
# https://branch.io/resources/aasa-validator/Fallback Web Pages
The power of universal links is the automatic fallback. When your app is not installed, tapping https://myapp.com/profile/123 opens your website in the browser. Your website should handle these paths and either show the content directly or show an app download prompt.
Implement smart banners on your web pages (<meta name='apple-itunes-app' content='app-id=...'> on iOS, or Google Play instant app on Android) to prompt users to download the app. This creates a seamless install-then-reopen flow.
<!-- In your web page <head>: -->
<!-- iOS Smart Banner -->
<meta
name='apple-itunes-app'
content='app-id=123456789, app-argument=https://myapp.com/profile/123'
/>
<!-- Google Play referrer -->
<a href='https://play.google.com/store/apps/details?id=com.example.myapp&referrer=utm_source%3Dwebsite'>
Get it on Google Play
</a>Testing Universal Links End to End
End-to-end testing of universal links requires production or TestFlight/internal testing builds — not Expo Go. Test by sending yourself an email or Slack message with the HTTPS link and tapping it on a real device. The OS routes to your app only if both the entitlement and the server file are correctly configured.
For automated testing, create a checklist: AASA accessible, correct Team ID, correct paths, Associated Domains in entitlement, Android fingerprint matches release keystore, autoVerify in manifest, HTTPS cert valid. Check every item before submission.
// End-to-end test checklist:
// 1. curl AASA: HTTP 200, content-type: application/json
// 2. curl assetlinks.json: HTTP 200, correct fingerprint
// 3. EAS Build production: associatedDomains in entitlement
// 4. Android: adb shell pm get-app-link shows 'verified'
// 5. iOS: open https://myapp.com/profile/test in Notes app
// → should open app, not Safari
// 6. Android: open URL in any browser
// → disambiguation dialog or direct openQuick Check
Test your understanding of React Native Mobile Development concepts from this lesson.
Lesson Recap
In this lesson you learned: universal links use HTTPS URLs with server-side verification files (AASA for iOS, assetlinks.json for Android) to securely route links to your app, iOS requires the Associated Domains entitlement in the app and Android requires an intent-filter with autoVerify, and universal links provide a graceful web fallback when the app is not installed. Next up we add push notifications by registering for push tokens with expo-notifications.
자주 묻는 질문
“iOS 및 Android의 유니버설 링크(HTTPS 딥 링크)” 강의는 무료인가요?
네 — “iOS 및 Android의 유니버설 링크(HTTPS 딥 링크)” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 React Native Academy 강의 전체를 잠금 해제할 수 있습니다. React Native Academy 강의에는 총 4개의 강의가 포함되어 있습니다.
“iOS 및 Android의 유니버설 링크(HTTPS 딥 링크)”에서 뭘 배우나요?
웹 서버에 Apple App Site Association 및 Android App Links 파일을 설정하고, 앱에서 자격 및 인텐트 필터를 구성한 다음 딥 링크가 처음부터 끝까지 작동하는지 확인합니다. 브라우저에서 직접 실행하는 실습 코드로 React Native Academy을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.
React Native Academy을(를) 시작하는 데 경험이 필요한가요?
사전 경험은 필요하지 않습니다. CoddyKit의 React Native Academy은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.
“iOS 및 Android의 유니버설 링크(HTTPS 딥 링크)” 강의는 얼마나 걸리나요?
대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.
이 React Native Academy 강의에서 코드를 작성하고 실행할 수 있나요?
네. 모든 React Native Academy 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.
이 강의의 모든 강의
- 사용자 지정 URL 스킴 구성
- Linking API와 URL 파싱
- React Navigation 딥 링크 구성
- iOS 및 Android의 유니버설 링크(HTTPS 딥 링크)