介绍使用 Expo 应用服务 (EAS) 构建 Android 和 iOS 应用的教程,其中涵盖构建、更新和提交工作流程。
¥About this tutorial
本教程将帮助你熟练掌握 Expo 应用服务(EAS) 核心服务:构建、提交 和 更新。完成本教程后,你将了解如何为个人和团队项目设置专业的移动持续集成 (CI)/持续开发 (CD) 管道。
¥This tutorial will give you proficiency with Expo Application Services (EAS) core services: Build, Submit, and Update. When you complete the tutorial, you will know how to set up a professional mobile Continuous Integration (CI)/Continuous Development (CD) pipeline for your individual and team projects.
本教程涵盖以下主题:
¥This tutorial covers the following topics:
使用 EAS Build 创建并安装开发版本,然后在设备、模拟器或模拟器上运行它。
¥Use EAS Build to create and install a development build, then run it on a device, emulator, or simulator.
体验使用开发构建而不是 Expo Go 的好处。
¥Experience the benefits of using a development build instead of Expo Go.
实现与团队或外部利益相关者共享开发构建的工作流程。
¥Implement workflows for sharing development builds with a team or external stakeholders.
自动增加应用构建版本。
¥Automatically increment app build versions.
在一台设备上同时安装不同的应用变体,例如开发版和预览版。
¥Simultaneously install different app variants, like development and preview, on one device.
利用 EAS 更新在开发阶段快速创建和部署更新。
¥Utilize EAS Update to create and deploy updates swiftly during the development phase.
通过与 GitHub 存储库集成来自动化构建过程。
¥Automate build processes by integrating with a GitHub repository.
这些主题将为我们提供有效使用 EAS 以及在需要时处理更高级主题所需的基础。
¥These topics will give us the foundation needed to use EAS effectively and to approach more advanced topics when needed.
¥Prerequisites
本教程是实践性的,预计在大约两个小时内完成。你将需要一个现有的 Expo 项目来跟进并在你的计算机上进行本地设置。选项包括:
¥This tutorial is hands-on and designed to be completed in about two hours. You will need an existing Expo project to follow along and set it up locally on your machine. Options include:
继续我们之前教程中的 Sticker Smash 应用。如果是新的,请从 GitHub 下载。
¥Continuing with the Sticker Smash app from our previous tutorial. If new, download it from GitHub.
与 npx create-expo-app
开始一个新项目。
¥Starting a new project with npx create-expo-app
.
使用一个裸露的 React Native 项目。确保安装了 expo
软件包,你可以执行 automatically 或 manually 操作。
¥Using a bare React Native project. Ensure the expo
package is installed, which you can do automatically or manually.
¥Tools
Expo 轨道 在 macOS 和 Windows 上一键管理和启动构建。
¥Expo Orbit to manage and launch builds with one click on macOS and Windows.
如果你想同时在计算机上本地安装并运行构建,可以使用 Android 模拟器或 iOS 模拟器。要设置它们,请参阅以下内容:
¥If you want to install and run the build locally on your machine simultaneously, you can use Android Emulator or iOS Simulator. To set them up, see the following:
iOS 模拟器(仅适用于 macOS)
¥iOS Simulator (available only on macOS)
¥Next step
在当地建立了 Expo 项目后,我们已经为这一旅程做好了准备。在下一章中,我们将学习如何使用 EAS Build 创建你的第一个构建。
¥We're ready for this journey after setting up an Expo project locally. In the next chapter, let's learn how to create your first build with EAS Build.
让我们从配置开发版本开始。