Add an App Clip to an Expo App skill

Add an iOS App Clip target to an Expo app.

by expo·MIT license·★ 2,657 Stars on the repo·GitHub ↗

Use now

Files of Add an App Clip to an Expo App

expo/main1 file shown
SKILL.md
Show the full text291 lines

Add an App Clip to an Expo App

Requirements. 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 or bunx testflight uses your EAS plan's build minutes. See https://expo.dev/pricing and https://developer.apple.com/app-clips/.

Adds an iOS App Clip target to an Expo project. The Clip lives in targets/clip/, ships alongside the parent app, and is invoked from a URL on the app's domain via an Apple App Site Association (AASA) file.

The parent app's bundle ID becomes com.<username>.<app-name> and the Clip's is automatically derived as <parent>.clip (e.g. com.bacon.may20.clip).

1. Set bundleIdentifier and appleTeamId

bun create target warns if these are missing. Add to app.json:

{
  "expo": {
    "ios": {
      "bundleIdentifier": "com.<username>.<app-name>",
      "appleTeamId": "XX57RJ5UTD"
    }
  }
}

2. Add the App Clip target

bun create target clip

This installs @bacons/apple-targets, adds it to the plugins array in app.json, and writes:

  • targets/clip/expo-target.config.js — the target's config plugin
  • targets/clip/Info.plist — Clip Info.plist
  • targets/clip/AppDelegate.swift, Assets.xcassets, etc.

Pick a good icon or reuse the existing one defined in the app — check it with bunx expo config under the icon or ios.icon key.

3. Wire up associated domains

The parent app and the Clip each need the Associated Domains entitlement pointing at the domain that hosts the AASA file.

In app.json, add both applinks: (parent) and appclips: (Clip invocation) entries:

{
  "expo": {
    "ios": {
      "associatedDomains": [
        "applinks:may20.expo.app",
        "appclips:may20.expo.app"
      ]
    }
  }
}

In targets/clip/expo-target.config.js, declare the Clip's entitlement:

/** @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, expo prebuild will print: Apple App Clip may require the associated domains entitlement but none were found.

4. Register bundle IDs and create the App Store entry

bunx setup-safari

This logs in to the Apple Developer account, registers com.bacon.may20, creates the App Store Connect entry, and prints:

  • A starter apple-app-site-association JSON
  • A <meta name="apple-itunes-app"> tag with the iTunes app id
  • Team ID, iTunes ID, and Bundle ID

5. Host the AASA file

App Clips are invoked when iOS fetches https://<your-domain>/.well-known/apple-app-site-association and finds a matching appclips entry.

mkdir -p public/.well-known
touch public/.well-known/apple-app-site-association

Paste the JSON setup-safari printed, but add an appclips block for the Clip's full app ID (<TeamID>.<ClipBundleID>). The output of setup-safari only covers the parent app:

{
  "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"]
  }
}

Notes:

  • The file has no extension and no Content-Type requirements beyond being served as-is. Expo Router static export serves files in public/ verbatim.
  • The appclips block is what lets a URL on the domain launch the Clip.
  • webcredentials is used for sharing credentials between the website, parent app, and the App Clip.
  • activitycontinuation is optional and used for sharing the link between mobile and desktop. Must be used with Head from expo-router — see https://docs.expo.dev/router/advanced/apple-handoff/
  • Notation and route-disabling details: https://sosumi.ai/documentation/xcode/supporting-associated-domains

6. Add the Smart App Banner meta tag

Create src/app/+html.tsx (Expo Router's HTML shell) and add the tag from setup-safari. Create the versioned template if it doesn't exist:

bunx expo customize src/app/+html.tsx

Add the meta tag to the <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>
  );
}

To make the website show the App Clip card instead of the install card, use:

<meta
  name="apple-itunes-app"
  content="app-id=6771566491, app-clip-bundle-id=com.bacon.may20.clip, app-clip-display=card"
/>

7. Deploy the website

The AASA file must be live before iOS will trust the association. Use EAS Hosting:

bunx expo export -p web
eas deploy --prod

This publishes the site (including /.well-known/apple-app-site-association) at https://<slug>.expo.app. Verify:

curl https://may20.expo.app/.well-known/apple-app-site-association

8. Mirror permissions

Inspect the parent app's permissions after prebuild:

npx expo config --type introspect

Look at the infoPlist object — mirror the permission keys in the App Clip's Info.plist so matching APIs can be used from the Clip.

Set deploymentTarget: "17.6" in the Clip's target config — App Clips have a higher minimum size limit in iOS 17.6.

If the app uses push notifications or location services, add to the App Clip's Info.plist to request the necessary permissions:

<key>NSAppClip</key>
<dict>
  <key>NSAppClipRequestEphemeralUserNotification</key>
  <false/>
  <key>NSAppClipRequestLocationConfirmation</key>
  <true/>
</dict>

9. Build and submit to TestFlight

bunx testflight

This will:

  1. Generate an eas.json if missing.
  2. Set up credentials for both targets (parent + Clip). Each gets its own provisioning profile but can share a single Distribution Certificate.
  3. Sync capabilities — note Enabled: Associated Domains for the Clip target.
  4. Build, upload, and schedule a TestFlight submission.

10. Configure App Clip metadata

Pull existing App Store metadata to local:

eas metadata:pull

Add apple.appClip to store.config.json. Up to 3 invocation URLs can launch the Clip from a web page:

{
  "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"
          }
        }
      }
    }
  }
}

The headerImage must be a 1800x1200 PNG with no opacity.

Push back to the store:

eas metadata:push

Apple's recommended App Clip metadata guidelines: https://sosumi.ai/documentation/appclip/configuring-the-launch-experience-of-your-app-clip

What you get

  • Parent app target: com.bacon.may20
  • App Clip target: com.bacon.may20.clip, lives in targets/clip/
  • AASA hosted at https://may20.expo.app/.well-known/apple-app-site-association
  • Smart App Banner meta tag on every web route
  • Every route linked to its native counterpart
  • TestFlight build of the parent app with the Clip embedded

Once Apple invokes the Clip from a URL on the domain, iOS opens targets/clip/'s entry point which loads the React Native app.

Native detection (optional)

To let JS detect when it's running inside an App Clip and present an install prompt for the full app, create a local Expo module (bunx create-expo-module --local) that exposes navigator.appClip.prompt().

See ./references/native-module.md for the Swift module, TypeScript interface, and usage.

References

  • ./references/native-module.md — Local Expo module to detect App Clip context and present the SKOverlay install prompt

Submitting Feedback

If you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:

npx --yes submit-expo-feedback@latest --category skills --subject "expo-app-clip" "<actionable feedback>"

Only submit when you have something specific and actionable to report. Include as much relevant context as possible. If an AI agent repeatedly failed or the user had to take over an Expo task, load the expo-skill-feedback skill and follow its eval-candidate flow instead of reusing the command above.

1---
2name: expo-app-clip
3description: 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.
4---
5 
6# Add an App Clip to an Expo App
7 
8> **Requirements.** 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 or `bunx testflight` uses your EAS plan's build minutes. See https://expo.dev/pricing and https://developer.apple.com/app-clips/.
9 
10Adds an iOS App Clip target to an Expo project. The Clip lives in `targets/clip/`, ships alongside the parent app, and is invoked from a URL on the app's domain via an Apple App Site Association (AASA) file.
11 
12The parent app's bundle ID becomes `com.<username>.<app-name>` and the Clip's is automatically derived as `<parent>.clip` (e.g. `com.bacon.may20.clip`).
13 
14## 1. Set `bundleIdentifier` and `appleTeamId`
15 
16`bun create target` warns if these are missing. Add to `app.json`:
17 
18```json
19{
20 "expo": {
21 "ios": {
22 "bundleIdentifier": "com.<username>.<app-name>",
23 "appleTeamId": "XX57RJ5UTD"
24 }
25 }
26}
27```
28 
29## 2. Add the App Clip target
30 
31```sh
32bun create target clip
33```
34 
35This installs [`@bacons/apple-targets`](https://github.com/EvanBacon/expo-apple-targets), adds it to the `plugins` array in `app.json`, and writes:
36 
37- `targets/clip/expo-target.config.js` — the target's config plugin
38- `targets/clip/Info.plist` — Clip Info.plist
39- `targets/clip/AppDelegate.swift`, `Assets.xcassets`, etc.
40 
41Pick a good icon or reuse the existing one defined in the app — check it with `bunx expo config` under the `icon` or `ios.icon` key.
42 
43## 3. Wire up associated domains
44 
45The parent app and the Clip each need the Associated Domains entitlement pointing at the domain that hosts the AASA file.
46 
47In `app.json`, add both `applinks:` (parent) and `appclips:` (Clip invocation) entries:
48 
49```json
50{
51 "expo": {
52 "ios": {
53 "associatedDomains": [
54 "applinks:may20.expo.app",
55 "appclips:may20.expo.app"
56 ]
57 }
58 }
59}
60```
61 
62In `targets/clip/expo-target.config.js`, declare the Clip's entitlement:
63 
64```js
65/** @type {import('@bacons/apple-targets/app.plugin').ConfigFunction} */
66module.exports = (config) => ({
67 type: "clip",
68 icon: "https://github.com/expo.png",
69 entitlements: {
70 "com.apple.developer.associated-domains": ["appclips:may20.expo.app"],
71 },
72});
73```
74 
75> If you skip this, `expo prebuild` will print: `Apple App Clip may require the associated domains entitlement but none were found`.
76 
77## 4. Register bundle IDs and create the App Store entry
78 
79```sh
80bunx setup-safari
81```
82 
83This logs in to the Apple Developer account, registers `com.bacon.may20`, creates the App Store Connect entry, and prints:
84 
85- A starter `apple-app-site-association` JSON
86- A `<meta name="apple-itunes-app">` tag with the iTunes app id
87- Team ID, iTunes ID, and Bundle ID
88 
89## 5. Host the AASA file
90 
91App Clips are invoked when iOS fetches `https://<your-domain>/.well-known/apple-app-site-association` and finds a matching `appclips` entry.
92 
93```sh
94mkdir -p public/.well-known
95touch public/.well-known/apple-app-site-association
96```
97 
98Paste the JSON `setup-safari` printed, but **add an `appclips` block** for the Clip's full app ID (`<TeamID>.<ClipBundleID>`). The output of `setup-safari` only covers the parent app:
99 
100```json
101{
102 "applinks": {
103 "details": [
104 {
105 "appIDs": ["XX57RJ5UTD.com.bacon.may20"],
106 "components": [{ "/": "*", "comment": "Matches all routes" }]
107 }
108 ]
109 },
110 "appclips": {
111 "apps": ["XX57RJ5UTD.com.bacon.may20.clip"]
112 },
113 "activitycontinuation": {
114 "apps": ["XX57RJ5UTD.com.bacon.may20"]
115 },
116 "webcredentials": {
117 "apps": ["XX57RJ5UTD.com.bacon.may20"]
118 }
119}
120```
121 
122Notes:
123 
124- The file has **no extension** and **no `Content-Type` requirements** beyond being served as-is. Expo Router static export serves files in `public/` verbatim.
125- The `appclips` block is what lets a URL on the domain launch the Clip.
126- `webcredentials` is used for sharing credentials between the website, parent app, and the App Clip.
127- `activitycontinuation` is optional and used for sharing the link between mobile and desktop. Must be used with `Head` from expo-router — see https://docs.expo.dev/router/advanced/apple-handoff/
128- Notation and route-disabling details: https://sosumi.ai/documentation/xcode/supporting-associated-domains
129 
130## 6. Add the Smart App Banner meta tag
131 
132Create `src/app/+html.tsx` (Expo Router's HTML shell) and add the tag from `setup-safari`. Create the versioned template if it doesn't exist:
133 
134```sh
135bunx expo customize src/app/+html.tsx
136```
137 
138Add the meta tag to the `<head>`:
139 
140```tsx
141import { ScrollViewStyleReset } from "expo-router/html";
142 
143export default function Root({ children }: { children: React.ReactNode }) {
144 return (
145 <html lang="en">
146 <head>
147 <meta charSet="utf-8" />
148 <meta httpEquiv="X-UA-Compatible" content="IE=edge" />
149 <meta name="viewport" content="width=device-width, initial-scale=1" />
150 <meta name="apple-itunes-app" content="app-id=6771566491" />
151 <ScrollViewStyleReset />
152 </head>
153 <body>{children}</body>
154 </html>
155 );
156}
157```
158 
159To make the website show the App Clip card instead of the install card, use:
160 
161```html
162<meta
163 name="apple-itunes-app"
164 content="app-id=6771566491, app-clip-bundle-id=com.bacon.may20.clip, app-clip-display=card"
165/>
166```
167 
168## 7. Deploy the website
169 
170The AASA file must be live before iOS will trust the association. Use [EAS Hosting](https://docs.expo.dev/eas/hosting/):
171 
172```sh
173bunx expo export -p web
174eas deploy --prod
175```
176 
177This publishes the site (including `/.well-known/apple-app-site-association`) at `https://<slug>.expo.app`. Verify:
178 
179```sh
180curl https://may20.expo.app/.well-known/apple-app-site-association
181```
182 
183## 8. Mirror permissions
184 
185Inspect the parent app's permissions after prebuild:
186 
187```sh
188npx expo config --type introspect
189```
190 
191Look at the `infoPlist` object — mirror the permission keys in the App Clip's `Info.plist` so matching APIs can be used from the Clip.
192 
193Set `deploymentTarget: "17.6"` in the Clip's target config — App Clips have a higher minimum size limit in iOS 17.6.
194 
195If the app uses push notifications or location services, add to the App Clip's `Info.plist` to request the necessary permissions:
196 
197```xml
198<key>NSAppClip</key>
199<dict>
200 <key>NSAppClipRequestEphemeralUserNotification</key>
201 <false/>
202 <key>NSAppClipRequestLocationConfirmation</key>
203 <true/>
204</dict>
205```
206 
207## 9. Build and submit to TestFlight
208 
209```sh
210bunx testflight
211```
212 
213This will:
214 
2151. Generate an `eas.json` if missing.
2162. Set up credentials for **both** targets (parent + Clip). Each gets its own provisioning profile but can share a single Distribution Certificate.
2173. Sync capabilities — note `Enabled: Associated Domains` for the Clip target.
2184. Build, upload, and schedule a TestFlight submission.
219 
220## 10. Configure App Clip metadata
221 
222Pull existing App Store metadata to local:
223 
224```sh
225eas metadata:pull
226```
227 
228Add `apple.appClip` to `store.config.json`. Up to 3 invocation URLs can launch the Clip from a web page:
229 
230```json
231{
232 "configVersion": 0,
233 "apple": {
234 "appClip": {
235 "defaultExperience": {
236 "action": "PLAY",
237 "releaseWithAppStoreVersion": true,
238 "reviewDetail": {
239 "invocationUrls": ["https://may20.expo.app/", null, null]
240 },
241 "info": {
242 "en-US": {
243 "subtitle": "Instantly native with Expo",
244 "headerImage": "store/apple/app-clip/en-US/asc-app-clip.png"
245 }
246 }
247 }
248 }
249 }
250}
251```
252 
253The `headerImage` must be a 1800x1200 PNG with no opacity.
254 
255Push back to the store:
256 
257```sh
258eas metadata:push
259```
260 
261Apple's recommended App Clip metadata guidelines: https://sosumi.ai/documentation/appclip/configuring-the-launch-experience-of-your-app-clip
262 
263## What you get
264 
265- Parent app target: `com.bacon.may20`
266- App Clip target: `com.bacon.may20.clip`, lives in `targets/clip/`
267- AASA hosted at `https://may20.expo.app/.well-known/apple-app-site-association`
268- Smart App Banner meta tag on every web route
269- Every route linked to its native counterpart
270- TestFlight build of the parent app with the Clip embedded
271 
272Once Apple invokes the Clip from a URL on the domain, iOS opens `targets/clip/`'s entry point which loads the React Native app.
273 
274## Native detection (optional)
275 
276To let JS detect when it's running inside an App Clip and present an install prompt for the full app, create a local Expo module (`bunx create-expo-module --local`) that exposes `navigator.appClip.prompt()`.
277 
278See [./references/native-module.md](./references/native-module.md) for the Swift module, TypeScript interface, and usage.
279 
280## References
281 
282- ./references/native-module.md — Local Expo module to detect App Clip context and present the SKOverlay install prompt
283 
284## Submitting Feedback
285If you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:
286```bash
287npx --yes submit-expo-feedback@latest --category skills --subject "expo-app-clip" "<actionable feedback>"
288```
289Only submit when you have something specific and actionable to report. Include as much relevant context as possible.
290If an AI agent repeatedly failed or the user had to take over an Expo task, load the expo-skill-feedback skill and follow its eval-candidate flow instead of reusing the command above.
291 

Discussion

Alternatives

`expo-overview` — router & shared rules for Expo / EASEntry point and router for every Expo or EAS task. Load this skill first — before writing code and before choosing another expo-* / eas-* skill — when the request, PRD, or spec mentions Expo, EAS, Expo Go, or an expo-* package, or the project has an `expo` dependency in `package.json`. Within that gate it also covers app specs and designs to implement (tabs, stacks, maps, lists, navigation, building from a screenshot), and phrasings like 'implement a mobile app', 'make my app look native', 'add navigation', 'fetch some data', 'upgrade my SDK', 'add Expo to my existing native app', 'ship to the App Store', or 'I'm new to Expo, where do I start'. A fully specified request (SDK pinned, libraries named, layout given) still routes through here — the shared setup rules still apply. Do NOT load it when neither signal is present: a bare React Native project with no `expo` dependency is not Expo work. Detects the real goal, routes to the right expo-* / eas-* skill, and owns the shared setup rules.Coding · MITApp Store DeploymentBuild and submit iOS and Android apps with EAS to TestFlight, the App Store, or Google Play. Supports Expo and other React Native projects, plus existing native apps. Use for eas.json setup, release pipelines, signing, app versions and build numbers, store submissions, and listing metadata. For Expo websites and API routes, use eas-hosting; for adding React Native screens to a native app, use expo-brownfield.Coding · MITDesigning with SleekUse when the user wants to design a mobile app or UI screens, when they mention their Sleek (sleek.design) projects, or when implementing Sleek designs in code (HTML, React Native, SwiftUI).Coding · MITBuild an advanced music app for androidCreate an advanced music app for Android with features similar to Blooome.Coding · CC0-1.0