@ainias42/express-app
v0.4.5
Published
EA can generate the static association files for iOS Universal Links and Android App Links during `ea build`. Configure deeplinks in `ea.config.ts`:
Readme
Express App
Capacitor Deeplinks
EA can generate the static association files for iOS Universal Links and Android App Links during ea build.
Configure deeplinks in ea.config.ts:
export default {
serverAddress: 'https://example.com',
capacitor: {
appId: 'com.example.app',
appName: 'Example App',
},
deeplinks: {
enabled: true,
paths: ['*'],
ios: {
teamId: 'ABCDE12345',
},
android: {
sha256CertFingerprints: ['AA:BB:CC:...'],
},
},
};The build writes:
.ea/client/.well-known/apple-app-site-association
.ea/client/.well-known/assetlinks.json
.ea/app/.well-known/apple-app-site-association
.ea/app/.well-known/assetlinks.jsonDeploy the .ea/client files with your website. They must be reachable through HTTPS, for example:
https://example.com/.well-known/apple-app-site-association
https://example.com/.well-known/assetlinks.jsonServe both files without redirects. For nginx, make sure apple-app-site-association is served with a JSON content type even though it has no .json extension.
The Capacitor runtime uses @capacitor/app to handle cold-start and already-running deeplink opens.
iOS Native Setup
Universal Links also require an Associated Domains entitlement in the native iOS app.
- Open the Capacitor iOS project in Xcode.
- Select the app target.
- Open
Signing & Capabilities. - Add the
Associated Domainscapability. - Add your domain in this format:
applinks:example.comUse the host from serverAddress, without https:// and without a port.
Android Native Setup
Android App Links also require an intent filter in android/app/src/main/AndroidManifest.xml.
Add it inside the main activity:
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="example.com" />
</intent-filter>Use the host from serverAddress, without https:// and without a port.
The sha256CertFingerprints value should be the SHA-256 fingerprint of the signing certificate used for the Android app.
