Loading...
Loading...
Framework (OSS). Add an iOS App Clip target to an Expo app. Use when the user mentions App Clip, AASA, apple-app-site-association, appclips, smart app banner, or wants to ship a lightweight iOS Clip invoked from a URL alongside their parent app.
npx skill4agent add expo/skills expo-app-clipRequirements. Adding the App Clip target is open source. Shipping one requires an Apple Developer Program membership and App Store review, and the AASA file must be served over HTTPS on your domain (any HTTPS host works; EAS Hosting is one option). Building via EAS Build oruses your EAS plan's build minutes. See https://expo.dev/pricing and https://developer.apple.com/app-clips/.bunx testflight
targets/clip/com.<username>.<app-name><parent>.clipcom.bacon.may20.clipbundleIdentifierappleTeamIdbun create targetapp.json{
"expo": {
"ios": {
"bundleIdentifier": "com.<username>.<app-name>",
"appleTeamId": "XX57RJ5UTD"
}
}
}bun create target cliptargets/clip/expo-target.config.jstargets/clip/Info.plisttargets/clip/AppDelegate.swiftAssets.xcassetsbunx expo configiconios.iconapp.jsonapplinks:appclips:{
"expo": {
"ios": {
"associatedDomains": [
"applinks:may20.expo.app",
"appclips:may20.expo.app"
]
}
}
}targets/clip/expo-target.config.js/** @type {import('@bacons/apple-targets/app.plugin').ConfigFunction} */
module.exports = (config) => ({
type: "clip",
icon: "https://github.com/expo.png",
entitlements: {
"com.apple.developer.associated-domains": ["appclips:may20.expo.app"],
},
});If you skip this,will print:expo prebuild.Apple App Clip may require the associated domains entitlement but none were found
bunx setup-safaricom.bacon.may20apple-app-site-association<meta name="apple-itunes-app">https://<your-domain>/.well-known/apple-app-site-associationappclipsmkdir -p public/.well-known
touch public/.well-known/apple-app-site-associationsetup-safariappclips<TeamID>.<ClipBundleID>setup-safari{
"applinks": {
"details": [
{
"appIDs": ["XX57RJ5UTD.com.bacon.may20"],
"components": [{ "/": "*", "comment": "Matches all routes" }]
}
]
},
"appclips": {
"apps": ["XX57RJ5UTD.com.bacon.may20.clip"]
},
"activitycontinuation": {
"apps": ["XX57RJ5UTD.com.bacon.may20"]
},
"webcredentials": {
"apps": ["XX57RJ5UTD.com.bacon.may20"]
}
}Content-Typepublic/appclipswebcredentialsactivitycontinuationHeadsrc/app/+html.tsxsetup-safaribunx expo customize src/app/+html.tsx<head>import { ScrollViewStyleReset } from "expo-router/html";
export default function Root({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-itunes-app" content="app-id=6771566491" />
<ScrollViewStyleReset />
</head>
<body>{children}</body>
</html>
);
}<meta
name="apple-itunes-app"
content="app-id=6771566491, app-clip-bundle-id=com.bacon.may20.clip, app-clip-display=card"
/>bunx expo export -p web
eas deploy --prod/.well-known/apple-app-site-associationhttps://<slug>.expo.appcurl https://may20.expo.app/.well-known/apple-app-site-associationnpx expo config --type introspectinfoPlistInfo.plistdeploymentTarget: "17.6"Info.plist<key>NSAppClip</key>
<dict>
<key>NSAppClipRequestEphemeralUserNotification</key>
<false/>
<key>NSAppClipRequestLocationConfirmation</key>
<true/>
</dict>bunx testflighteas.jsonEnabled: Associated Domainseas metadata:pullapple.appClipstore.config.json{
"configVersion": 0,
"apple": {
"appClip": {
"defaultExperience": {
"action": "PLAY",
"releaseWithAppStoreVersion": true,
"reviewDetail": {
"invocationUrls": ["https://may20.expo.app/", null, null]
},
"info": {
"en-US": {
"subtitle": "Instantly native with Expo",
"headerImage": "store/apple/app-clip/en-US/asc-app-clip.png"
}
}
}
}
}
}headerImageeas metadata:pushcom.bacon.may20com.bacon.may20.cliptargets/clip/https://may20.expo.app/.well-known/apple-app-site-associationtargets/clip/bunx create-expo-module --localnavigator.appClip.prompt()