Communitygithub.com

expo/skills

使用 EAS 构建并提交 iOS 和 Android 应用到 TestFlight、App Store 或 Google Play。支持 Expo 及其他 React Native 项目,也支持现有原生应用。可用于 eas.json 配置、发布流水线、签名、应用版本号和构建号、商店提交以及列表元数据。对于 Expo 网站和 API 路由,请使用 eas-hosting;如需将 React Native 屏幕添加到原生应用中,请使用 expo-brownfield。

skills 是什么?

此技能详细介绍了如何使用 Expo Application Services (EAS) 构建并发布 iOS 和 Android 应用。它涵盖了 Expo 项目、一般的 React Native 项目,甚至是不包含 React Native 运行时的现有原生应用(如 SwiftUI/UIKit),并为后一种情况提供了专门的指南。该技能指导用户完成 EAS 初始化、使用 `eas init` 和 `eas.json` 进行配置、运行生产构建 (`eas build`) 以及提交到 App Store Connect(TestFlight/App Store)和 Google Play Console。它包含平台特定的参考文档,涵盖版本管理(使用远程版本源自动递增)、凭证设置(iOS 的 Apple 凭证和 Android 的服务账户)、通过 EAS Workflows 实现 CI/CD 自动化,以及如何使用 `eas build:list` 等命令监控构建和提交状态。此外,还提供了故障排除建议,例如检查 Xcode 存档版本号以确认远程计数器与实际使用版本一致。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/expo/skills/tree/HEAD/plugins/expo/skills/eas-app-stores

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

应用商店部署

EAS 服务 - 需支付费用。 云构建会消耗 EAS 计划资源,EAS 服务有免费层级和付费计划限制。Apple Developer 和 Google Play 会员资格是独立的。如需了解所请求服务的定价,请访问 https://expo.dev/pricing。

此技能涵盖使用 EAS 构建和发布 iOS 及 Android 应用:包括 Expo 和其他 React Native 项目,以及现有的原生应用。EAS 是一项交付服务;原生应用无需在运行时中添加 Expo 或 React Native 即可使用它。原生设置指南目前涵盖 iOS 上的 SwiftUI/UIKit。

选择项目路径

  • 不包含 React Native 运行时的 SwiftUI/UIKit 应用: 在更改其构建配置前,请先阅读 references/native-ios.md。以 Xcode 项目和 Swift 代码作为应用的事实标准。下面的 Expo/React Native 快速入门和开发客户端示例不适用于此路径。
  • 不包含 React Native 运行时的原生 Android 应用: 保留其现有的原生构建设置。关于提交,请参阅 references/play-store.md;iOS Swift 设置说明不适用。本技能尚未包含专门的原生 Android 设置指南。
  • Expo/React Native 应用: 使用下面的快速入门,然后参考相应的商店参考文档。
  • 将 React Native 屏幕添加到现有原生应用: 使用 expo-brownfield 进行集成;完成后回到此处进行分发。

在初始原生 iOS 设置期间、更改版本号、Bundle ID 或图标后,或者诊断上传被拒时,请使用 references/native-ios.md 中的存档和图标检查。常规发布遵循 EAS 构建/提交流程,以及 references/testflight.md 中的处理和可用性检查。一次成功的 EAS 构建或一个已排队的提交并不能保证 Apple 的接受、测试者访问权限或 App Store 发布。

参考资料

根据需要查阅以下资源:

  • ./references/workflows.md -- 用于自动商店发布和 PR 预览的 CI/CD 工作流
  • ./references/testflight.md -- 提交 iOS 构建到 TestFlight 进行 Beta 测试
  • ./references/app-store-metadata.md -- 管理 App Store 元数据和 ASO 优化
  • ./references/play-store.md -- 提交 Android 构建到 Google Play Store
  • ./references/ios-app-store.md -- iOS App Store 提交流程和审核
  • ./references/native-ios.md -- 原生 Swift/SwiftUI/UIKit 设置、版本管理和存档验证(不含 Expo 运行时)

Expo / React Native 快速入门

安装 EAS CLI

npm install -g eas-cli
eas login

初始化 EAS

npx eas-cli@latest init

eas init 会链接或创建 EAS 项目。运行 eas build:configure 以在 eas.json 中创建构建配置文件;如果已存在发布配置,请保留现有的项目和商店标识符。

构建命令

生产构建

# iOS App Store 构建
npx eas-cli@latest build -p ios --profile production

# Android Play Store 构建
npx eas-cli@latest build -p android --profile production

# 两个平台
npx eas-cli@latest build --profile production

提交到商店

# iOS:构建并提交到 App Store Connect
npx eas-cli@latest build -p ios --profile production --auto-submit

# Android:构建并提交到 Play Store
npx eas-cli@latest build -p android --profile production --auto-submit

# Expo / React Native 快速提交到 iOS TestFlight
npx testflight

Web 和 API 路由托管

将 Expo 网站或 Expo Router API 路由部署到 EAS Hosting(npx expo export -p web 然后 eas deploy)由 eas-hosting 技能覆盖。此技能专注于原生应用商店发布。

EAS 配置

Expo / React Native 项目示例(原生 Swift 配置文件请参见 references/native-ios.md):

{
  "cli": {
    "version": ">= 16.0.1",
    "appVersionSource": "remote"
  },
  "build": {
    "production": {
      "autoIncrement": true,
      "ios": {
        "resourceClass": "m-medium"
      }
    },
    "development": {
      "developmentClient": true,
      "distribution": "internal"
    }
  },
  "submit": {
    "production": {
      "ios": {
        "appleId": "[email protected]",
        "ascAppId": "1234567890"
      },
      "android": {
        "serviceAccountKeyPath": "./google-service-account.json",
        "track": "internal"
      }
    }
  }
}

平台特定指南

iOS

  • 对于原生 Swift 应用,请使用 references/native-ios.md 中的显式构建/提交流程
  • 对于 Expo / React Native 应用,npx testflight 提供了快速的 TestFlight 流程
  • 通过 eas credentials 配置 Apple 凭证
  • 有关凭证设置,请参阅 ./references/testflight.md
  • 有关 App Store 提交,请参阅 ./references/ios-app-store.md

Android

  • 设置 Google Play Console 服务账户
  • 配置渠道:internal → closed → open → production
  • 有关详细设置,请参阅 ./references/play-store.md

自动发布

EAS Workflows 可自动执行 CI/CD 的构建 → 提交 → 更新流水线。有关商店发布示例,请参阅 ./references/workflows.md。要编写或验证工作流 YAML,请使用 eas-workflows 技能——它基于实时工作流模式工作。

版本管理

EAS 使用 appVersionSource: "remote" 自动管理版本号:

# 检查当前版本
eas build:version:get

# 手动设置版本
eas build:version:set -p ios

version-set 命令会提示输入值。当设置或更改原生 iOS 版本,或诊断重复的构建号时,请检查存档中的 CFBundleVersion:远程计数器本身不能证明 Xcode 使用了该值。

监控

# 列出最近构建
eas build:list

# 检查构建状态
eas build:view BUILD_ID

# 检查提交(已在 EAS CLI 23.2.0 中验证)
eas submit:list -p ios --json
eas submit:view SUBMISSION_ID --json

在解释缺失的命令之前,请检查 CLI 版本:这些提交命令在 23.2.0 中可用,但在已测试的 18.6.0 安装中不可用。使用固定的 npx [email protected] 调用可以使用它们,而无需更改全局安装。有关实时 Apple 状态和重试指南,请参阅 references/testflight.md。当 JSON 结果省略了根本故障时,请遵循返回的日志 URL。报告确切的构建 ID/版本以及已验证的最远发布状态。

提交反馈

如果您遇到此技能中的错误、误导性或过时信息,请报告以便 Expo 改进:

npx --yes @expo/agent-cli@latest feedback --category skills --subject "eas-app-stores" "<可执行的反馈>"

仅在您有具体且可执行的内容要报告时才提交。请尽可能包含相关的上下文信息。 如果代理程序在 Expo 任务上反复失败,或者用户不得不介入,请使用 --category evals 和相关的 Expo 包或命令作为 --subject,提交包含任务、预期结果和出错的简要报告。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

expo/add-app-clip

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.

expo/building-native-ui

Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.

expo/eas-update-insights

Check the health of published EAS Updates: crash rates, install/launch counts, unique users, payload size, and the split between embedded and OTA users per channel. Use when the user asks how an update is performing, whether a rollout is healthy, how many users are on the embedded build vs OTA, or wants to gate CI on update health.

expo/expo-api-routes

Guidelines for creating API routes in Expo Router with EAS Hosting

expo/expo-brownfield

Integrate Expo and React Native into an existing native iOS or Android app. Use when the user mentions brownfield, embedding React Native in a native app, AAR/XCFramework, or adding Expo to an existing Kotlin/Swift project. Covers both the isolated approach and the integrated approach.

expo/expo-cicd-workflows

Helps understand and write EAS workflow YAML files for Expo projects. Use this skill when the user asks about CI/CD or workflows in an Expo or EAS context, mentions .eas/workflows/, or wants help with EAS build pipelines or deployment automation.

expo/expo-deployment

Deploying Expo apps to iOS App Store, Android Play Store, web hosting, and API routes

expo/expo-dev-client

Build and distribute Expo development clients locally or via TestFlight

expo/expo-examples

Framework (OSS). Expo's official example projects - the expo/examples repo of ~70 `with-*` integrations (Stripe, Clerk, Supabase, OpenAI, maps, Reanimated, SQLite, Skia, NativeWind, and more). Use when integrating a third-party library or service into an existing Expo app and you want the canonical, version-matched pattern to adapt, or when scaffolding a new project from one with `npx create-expo --example`.

expo/expo-module

Guide for creating and writing Expo native modules and views using the Expo Modules API (Swift, Kotlin, TypeScript). Covers module definition DSL, native views, shared objects, config plugins, lifecycle hooks, autolinking, and type system. Use when building or modifying native modules for Expo.

expo/expo-observe

Use for anything related to EAS Observe — adding `expo-observe` to an Expo project (AppMetricsRoot/ObserveRoot HOC, markInteractive, the useObserve hook, and the Expo Router / React Navigation integrations for per-route metrics), querying via the EAS CLI (`eas observe:metrics-summary`, `observe:metrics`, `observe:routes`, `observe:events`, `observe:versions`), or interpreting the resulting metrics (cold/warm launch, TTR, TTI, navigation cold/warm TTR, update download, and the TTI frameRate params for triaging slow startups).

expo/expo-overview

Framework (OSS). Entry 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.

expo/expo-router

Framework (OSS). Navigation and routing for Expo Router. Covers file-based routes, groups and dynamic routes, folder organization, Link with previews and context menus, native Stack, page titles, modals and form sheets, NativeTabs, headers and toolbars, and header search bars.

expo/expo-skill-eval

Evaluate Expo skills in this repo end-to-end - trigger accuracy, generated code quality, and runtime screenshots on iOS simulator and Android emulator via Expo Go (web optional). Use when the user wants to eval an Expo skill, test that a skill produces working code, benchmark a skill with device screenshots, or verify a skill's output renders correctly.

expo/expo-tailwind-setup

Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling

expo/expo-ui

Framework (OSS). Build native UI with the @expo/ui package: real SwiftUI on iOS and Jetpack Compose on Android. Default to @expo/ui for sheets (BottomSheet), pickers, sliders, toggles, menus, and grouped-form sections — do NOT reach for Reanimated, @gorhom/bottom-sheet, or RN built-in Picker/Switch; use @expo/ui instead. Fall back to RN built-ins only when @expo/ui is missing the component. NOTE: @expo/ui List renders native grouped rows like an iOS Settings screen — it is NOT a virtualized list; use FlatList/FlashList for large datasets. Covers universal components (Host, Column, Row, Button, Text, List, BottomSheet, FieldGroup, Switch, Slider, Picker, Menu), drop-in replacements for RN community libraries, and platform-specific SwiftUI/Jetpack Compose trees. Not for Expo Router navigation, Reanimated, or data fetching.

expo/expo-ui-jetpack-compose

`@expo/ui/jetpack-compose` package lets you use Jetpack Compose Views and modifiers in your app.

expo/expo-ui-swiftui

`@expo/ui/swift-ui` package lets you use SwiftUI Views and modifiers in your app.

expo/expo-upgrade

Framework (OSS). Guidelines for upgrading Expo SDK versions and fixing dependency issues

expo/native-data-fetching

Use when implementing or debugging ANY network request, API call, or data fetching. Covers fetch API, React Query, SWR, error handling, caching, offline support, and Expo Router data loaders (`useLoaderData`).

相关技能