🛠️expo-dev-client
- プラグイン
- expo
- ライセンス
- MIT
- ソース
- GitHub で見る ↗
説明
Expo開発アプリのビルド 次のような場合に使用: Expoプロジェクトをローカル開発用にビルドする必要がある場合、またはシミュレーター/エミュレーター向けのビルドアーティファクトが必要な場合。
原文を表示
Build Expo app for development
ユースケース
- ✓Expoプロジェクトをローカル開発用にビルドするとき
- ✓シミュレーター向けビルドアーティファクトが必要なとき
- ✓エミュレーター向けビルドアーティファクトが必要なとき
本文(日本語訳)
EAS Buildを使用して、ネイティブコードの変更を物理デバイスでテストするための開発クライアントを作成します。これはアプリのブランチをテストするためのカスタムExpo Goクライアントを作成する際に使用します。
重要: 開発クライアントが必要な場合
開発クライアントは、実際のまたは本番環境のアプリに推奨されるセットアップです。 Expo Goはバンドルされたネイティブライブラリを使用した学習と迅速な実験用のプレイグラウンドです。ほとんどのアプリはやがてこれを上回り、開発クライアントに移行します。詳細はExpo Go vs. 開発ビルドを参照してください。
次のような場合にのみ開発クライアントが必要です:
- ローカルExpoモジュール(カスタムネイティブコード)
- Appleターゲット(ウィジェット、アプリクリップ、エクステンション)
- Expo Goに含まれていないサードパーティネイティブモジュール
- Config plugin、またはリモートプッシュ通知とApp/Universal Linksのテスト
EAS設定
eas.jsonに開発プロファイルがあることを確認します:
{
"cli": {
"version": ">= 16.0.1",
"appVersionSource": "remote"
},
"build": {
"production": {
"autoIncrement": true
},
"development": {
"autoIncrement": true,
"developmentClient": true
}
},
"submit": {
"production": {},
"development": {}
}
}
主要な設定:
developmentClient: true- 開発ビルド用にexpo-dev-clientをバンドルしますautoIncrement: true- ビルド番号を自動的にインクリメントしますappVersionSource: "remote"- バージョン番号の情報源としてEASを使用します
TestFlightへのビルド
iOSの開発クライアントをビルドし、1つのコマンドでTestFlightに送信します:
eas build -p ios --profile development --submit
次のことが実行されます:
- クラウドで開発クライアントをビルドします
- App Store Connectに自動的に送信します
- TestFlightでビルドの準備ができたときメールを送信します
TestFlightメールを受け取った後:
- デバイスのTestFlightからビルドをダウンロードします
- アプリを起動してexpo-dev-clientのUIを確認します
- ローカルMetro bundlerに接続するか、QRコードをスキャンします
ローカルビルド
マシンで開発クライアントをビルドします:
# iOS (Xcodeが必要)
eas build -p ios --profile development --local
# Android
eas build -p android --profile development --local
ローカルビルドの出力:
- iOS:
.ipaファイル - Android:
.apkまたは.aabファイル
ローカルビルドのインストール
iOSビルドをシミュレーターにインストール:
# .tar.gzの出力から.appを探します
tar -xzf build-*.tar.gz
xcrun simctl install booted ./path/to/App.app
iOSビルドをデバイスにインストール(署名が必要):
# Xcodeのデバイスウィンドウまたはideviceinstallerを使用
ideviceinstaller -i build.ipa
Androidビルドをインストール:
adb install build.apk
特定プラットフォーム向けビルド
# iOSのみ
eas build -p ios --profile development
# Androidのみ
eas build -p android --profile development
# 両方のプラットフォーム
eas build --profile development
ビルドステータスの確認
# 最近のビルドをリスト表示
eas build:list
# ビルド詳細を表示
eas build:view
開発クライアントの使用
インストール後、開発クライアントは以下を提供します:
- 開発サーバー接続 - Metro bundlerのURLを入力するか、QRコードをスキャンします
- ビルド情報 - ネイティブビルドの詳細を表示します
- ランチャーUI - 開発サーバー間を切り替えます
ローカル開発に接続:
# Metro bundlerを起動
npx expo start --dev-client
# 開発クライアントでQRコードをスキャンするか、URLを手動で入力
トラブルシューティング
署名エラーでビルドが失敗する場合:
eas credentials
ビルドキャッシュをクリア:
eas build -p ios --profile development --clear-cache
EAS CLIバージョンを確認:
eas --version
eas update
原文(English)を表示
Use EAS Build to create development clients for testing native code changes on physical devices. Use this for creating custom Expo Go clients for testing branches of your app.
Important: When Development Clients Are Needed
Development clients are the recommended setup for any real or production app. Expo Go is a playground for learning and quick experiments with the native libraries it bundles; most apps outgrow it and move to a development client. See Expo Go vs. development builds for the full reasoning.
You need a dev client ONLY when using:
- Local Expo modules (custom native code)
- Apple targets (widgets, app clips, extensions)
- Third-party native modules not in Expo Go
- Config plugins, or testing remote push notifications and App/Universal Links
EAS Configuration
Ensure eas.json has a development profile:
{
"cli": {
"version": ">= 16.0.1",
"appVersionSource": "remote"
},
"build": {
"production": {
"autoIncrement": true
},
"development": {
"autoIncrement": true,
"developmentClient": true
}
},
"submit": {
"production": {},
"development": {}
}
}
Key settings:
developmentClient: true- Bundles expo-dev-client for development buildsautoIncrement: true- Automatically increments build numbersappVersionSource: "remote"- Uses EAS as the source of truth for version numbers
Building for TestFlight
Build iOS dev client and submit to TestFlight in one command:
eas build -p ios --profile development --submit
This will:
- Build the development client in the cloud
- Automatically submit to App Store Connect
- Send you an email when the build is ready in TestFlight
After receiving the TestFlight email:
- Download the build from TestFlight on your device
- Launch the app to see the expo-dev-client UI
- Connect to your local Metro bundler or scan a QR code
Building Locally
Build a development client on your machine:
# iOS (requires Xcode)
eas build -p ios --profile development --local
# Android
eas build -p android --profile development --local
Local builds output:
- iOS:
.ipafile - Android:
.apkor.aabfile
Installing Local Builds
Install iOS build on simulator:
# Find the .app in the .tar.gz output
tar -xzf build-*.tar.gz
xcrun simctl install booted ./path/to/App.app
Install iOS build on device (requires signing):
# Use Xcode Devices window or ideviceinstaller
ideviceinstaller -i build.ipa
Install Android build:
adb install build.apk
Building for Specific Platform
# iOS only
eas build -p ios --profile development
# Android only
eas build -p android --profile development
# Both platforms
eas build --profile development
Checking Build Status
# List recent builds
eas build:list
# View build details
eas build:view
Using the Dev Client
Once installed, the dev client provides:
- Development server connection - Enter your Metro bundler URL or scan QR
- Build information - View native build details
- Launcher UI - Switch between development servers
Connect to local development:
# Start Metro bundler
npx expo start --dev-client
# Scan QR code with dev client or enter URL manually
Troubleshooting
Build fails with signing errors:
eas credentials
Clear build cache:
eas build -p ios --profile development --clear-cache
Check EAS CLI version:
eas --version
eas update
原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。