• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialdevelopment

expo-app-clip

プラグイン
expo
ソース
GitHub で見る ↗
説明

Framework(オープンソースソフトウェア)。Expoアプリに iOS App Clip(軽量版のiOSアプリ)ターゲットを追加します。 次のような場合に使用: - ユーザーが App Clip、AASA、apple-app-site-association、appclips、スマートアプリバナー(アプリの広告表示)に言及している - URLから呼び出される軽量版の iOS Clip をメインアプリと一緒に配信したい場合

原文を表示

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.

ユースケース
  • iOS App Clipターゲットを追加したい
  • 軽量版iOSアプリをメインアプリと配信する
  • URLから呼び出される App Clipを実装する
本文(日本語訳)

Expo アプリに App Clip を追加する

必要な要件 App Clip ターゲット(機能単位)を追加すること自体はオープンソースですが、実際に配布するには Apple Developer Program メンバーシップと App Store の審査が必要です。また、AASA ファイル(アプリ関連付けファイル)を HTTPS でドメイン上でホストする必要があります(どの HTTPS ホストでも可;EAS Hosting はその一選択肢)。EAS Build または bunx testflight 経由でビルドする場合、EAS プランのビルド時間を消費します。詳細は https://expo.dev/pricing および https://developer.apple.com/app-clips/ をご覧ください。

Expo プロジェクトに iOS App Clip ターゲット(機能単位)を追加します。Clip は targets/clip/ に格納され、親アプリと一緒に配布され、Apple App Site Association(AASA)ファイルを通じてアプリのドメイン上の URL から起動されます。

親アプリのバンドル ID は com.<ユーザー名>.<アプリ名> となり、Clip のバンドル ID は自動的に <親>.clip として導出されます(例:com.bacon.may20.clip)。

1. bundleIdentifier と appleTeamId を設定する

bun create target コマンドはこれらが不足していると警告します。app.json に追加してください:

{
  "expo": {
    "ios": {
      "bundleIdentifier": "com.<ユーザー名>.<アプリ名>",
      "appleTeamId": "XX57RJ5UTD"
    }
  }
}

2. App Clip ターゲットを追加する

bun create target clip

このコマンドは @bacons/apple-targets をインストールし、app.json の plugins 配列に追加して、以下を生成します:

  • targets/clip/expo-target.config.js — ターゲット設定プラグイン
  • targets/clip/Info.plist — Clip 用の設定ファイル
  • targets/clip/AppDelegate.swift、Assets.xcassets など

良好なアイコンを選択するか、既存のアプリアイコンを再利用してください。bunx expo config で icon キーまたは ios.icon キーの下をチェックすれば確認できます。

3. 関連付けドメインを設定する

親アプリと Clip の両方に、AASA ファイルをホストするドメインを指す「関連付けドメイン」権限が必要です。

app.json に、親アプリ用の applinks: と Clip 起動用の appclips: の両エントリを追加します:

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

targets/clip/expo-target.config.js で Clip の権限を宣言します:

/** @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"],
  },
});

この設定を省略すると、expo prebuild は以下を表示します:Apple App Clip may require the associated domains entitlement but none were found(App Clip には関連付けドメイン権限が必要な可能性がありますが見つかりませんでした)。

4. バンドル ID を登録し App Store エントリを作成する

bunx setup-safari

このコマンドは Apple Developer アカウントにログインし、com.bacon.may20 を登録し、App Store Connect エントリを作成して、以下を表示します:

  • スターター用の apple-app-site-association JSON
  • iTunes app ID を含む <meta name="apple-itunes-app"> タグ
  • チーム ID、iTunes ID、バンドル ID

5. AASA ファイルをホストする

iOS が https://<ドメイン>/.well-known/apple-app-site-association をフェッチして、一致する appclips エントリを見つけたとき、App Clip が起動されます。

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

setup-safari が表示した JSON を貼り付けますが、appclips ブロックを追加して Clip のフルアプリ ID(<チームID>.<ClipバンドルID>)を含めてください。setup-safari の出力は親アプリのみ対応しています:

{
  "applinks": {
    "details": [
      {
        "appIDs": ["XX57RJ5UTD.com.bacon.may20"],
        "components": [{ "/": "*", "comment": "すべてのルートにマッチ" }]
      }
    ]
  },
  "appclips": {
    "apps": ["XX57RJ5UTD.com.bacon.may20.clip"]
  },
  "activitycontinuation": {
    "apps": ["XX57RJ5UTD.com.bacon.may20"]
  },
  "webcredentials": {
    "apps": ["XX57RJ5UTD.com.bacon.may20"]
  }
}

注意:

  • このファイルは 拡張子なし で、コンテンツ形式(Content-Type)の指定不要 です。そのまま配信されます。Expo Router の静的エクスポートは public/ 内のファイルをそのまま配信します。
  • appclips ブロックが、ドメイン上の URL から Clip を起動させる機能です。
  • webcredentials は Web サイト、親アプリ、App Clip 間での認証情報(クレデンシャル)の共有に使用されます。
  • activitycontinuation はオプションで、モバイルとデスクトップ間でのリンク共有に使用されます。expo-router の Head と組み合わせて使用する必要があります。詳細は https://docs.expo.dev/router/advanced/apple-handoff/ をご覧ください。
  • 記法とルート無効化の詳細:https://sosumi.ai/documentation/xcode/supporting-associated-domains

6. Smart App Banner メタタグを追加する

src/app/+html.tsx(Expo Router の HTML シェル)を作成し、setup-safari から取得したタグを追加します。テンプレートがない場合は先に生成してください:

bunx 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>
  );
}

Web サイトがインストールカードではなく App Clip カードを表示させるには、次のように変更します:

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

7. Web サイトをデプロイする

AASA ファイルは iOS が関連付けを信頼する前にライブである必要があります。EAS Hosting を使用してください:

bunx expo export -p web
eas deploy --prod

このコマンドはサイト(/.well-known/apple-app-site-association を含む)を https://<スラッグ>.expo.app で公開します。確認方法:

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

8. パーミッション(許可)を同期する

prebuild 後、親アプリのパーミッションを確認します:

npx expo config --type introspect

infoPlist オブジェクトを確認し、パーミッション キーを App Clip の Info.plist にも反映させ、同じ API を Clip から使用できるようにしてください。

Clip のターゲット設定に deploymentTarget: "17.6" を設定してください。App Clip は iOS 17.6 でより高い最小サイズ制限を有しています。

アプリがプッシュ通知またはロケーション(位置情報)サービスを使用している場合、必要なパーミッションを要求する設定を App Clip の Info.plist に追加します:

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

9. ビルドして TestFlight に提出する

bunx testflight

このコマンドは以下を実行します:

  1. 必要に応じて eas.json を生成します。
  2. 両方の ターゲット(親 + Clip)の認証情報をセットアップします。各ターゲットは独自のプロビジョニングプロファイル(署名設定)を取得しますが、単一の配布証明書を共有できます。
  3. 機能を同期します。Clip ターゲットで Enabled: Associated Domains(関連付けドメイン有効)に注目します。
  4. ビルド、アップロード、TestFlight 提出をスケジュールします。

10. App Clip メタデータを設定する

既存の App Store メタデータをローカルに取得します:

eas metadata:pull

store.config.json に apple.appClip を追加します。最大 3 つの起動 URL が Web ページから Clip を起動できます:

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

headerImage は透明度なしの 1800×1200 PNG である必要があります。

ストアに戻して公開します:

eas metadata:push

Apple が推奨する App Clip メタデータガイドライン:https://sosumi.ai/documentation/appclip/configuring-the-launch-experience-of-your-app-clip

完成時の構成

  • 親アプリターゲット:com.bacon.may20
  • App Clip ターゲット:com.bacon.may20.clip(targets/clip/ に格納)
  • AASA ホスト:https://may20.expo.app/.well-known/apple-app-site-association
  • すべての Web ルートに Smart App Banner メタタグ
  • 各ルートがネイティブ相当物にリンク
  • 親アプリの TestFlight ビルド(Clip 組み込み)

Apple が URL からClip を起動すると、iOS は targets/clip/ のエントリーポイントを開き、React Native アプリを読み込みます。

ネイティブ検出(オプション)

JavaScript が App Clip コンテキスト内で実行されていることを検出して、フルアプリのインストール確認を提示するには、ローカル Expo モジュール(bunx create-expo-module --local)を作成し、navigator.appClip.prompt() を公開してください。

Swift モジュール、TypeScript インターフェース、使用方法については ./references/native-module.md をご覧ください。

参考資料

  • ./references/native-module.md — App Clip コンテキスト検出と SKOverlay インストールプロンプト表示用のローカル Expo モジュール

フィードバック送信

このスキルでエラーが発生した場合や、情報が不正確・古い場合は、報告して Expo を改善するのにご協力ください:

npx --yes submit-expo-feedback@latest --category skills --subject "expo-app-clip" "<実行可能なフィードバック>"

具体的かつ実行可能な内容がある場合のみ送信してください。関連するコンテキストをできるだけ多く含めてください。

AI エージェントが繰り返し失敗した場合や、ユーザーが Expo タスクを引き継ぐ必要があった場合は、上記のコマンドを再利用する代わりに expo-skill-feedback スキルを読み込み、その eval-candidate フローに従ってください。

原文(English)を表示

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.

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。