Interactive build preparation - validates config, credentials, and environment before providing the EAS build command
Validates Expo project configuration, credentials, and environment before generating ready-to-run EAS build commands.
/plugin marketplace add rahulkeerthi/expo-toolkit/plugin install expo-toolkit@withqwerty[dev|preview|production] [--ios|--android|--all]sonnetPrepare for an EAS build by validating all configuration, credentials, and environment settings. This command does NOT run the build - it ensures everything is ready and provides the exact command to run.
Use AskUserQuestion to gather build parameters:
AskUserQuestion({
questions: [
{
question: "Which platform are you building for?",
header: "Platform",
options: [
{
label: "iOS",
description: "Build for iPhone/iPad",
},
{
label: "Android",
description: "Build for Android devices",
},
{
label: "Both",
description: "Build for iOS and Android",
},
],
multiSelect: false,
},
{
question: "Which build profile?",
header: "Profile",
options: [
{
label: "development",
description: "Dev client build for local development",
},
{
label: "preview",
description: "Internal testing build (TestFlight/Internal track)",
},
{
label: "production",
description: "Production build for app store release",
},
],
multiSelect: false,
},
{
question: "Auto-submit after build completes?",
header: "Submit",
options: [
{
label: "Yes, auto-submit (Recommended for iOS)",
description: "Automatically submit to TestFlight/Play Store",
},
{
label: "No, just build",
description: "Build only, submit manually later",
},
],
multiSelect: false,
},
],
});
Check eas.json exists and is valid:
# Verify eas.json exists
cat eas.json
Validate required fields:
eas.json exists at project rootbuild sectionsubmit section exists for selected profileCheck app.config.js/app.json:
# View app configuration
npx expo config
Validate configuration:
app.config.js or app.json existsname and slug are setbundleIdentifier is setpackage is setextra.eas.projectId is set (for EAS builds)Check build profile environment variables:
// Read eas.json and extract env vars for selected profile
Read({ file_path: "eas.json" });
Validate:
APP_VARIANT set (if using dynamic config)Check EAS Secrets (if applicable):
# List configured secrets
eas secret:list
iOS Credentials (if building for iOS):
# Check iOS credential status
eas credentials --platform ios --non-interactive 2>&1 || echo "Run interactively for setup"
Validate iOS:
Android Credentials (if building for Android):
# Check Android credential status
eas credentials --platform android --non-interactive 2>&1 || echo "Run interactively for setup"
Validate Android:
Run expo doctor:
npx expo doctor
Check for:
Check native dependencies (if applicable):
# For iOS, check Podfile.lock exists
ls ios/Podfile.lock 2>/dev/null && echo "Pods configured" || echo "No iOS native project"
# For Android, check build.gradle exists
ls android/build.gradle 2>/dev/null && echo "Android configured" || echo "No Android native project"
Check version numbers:
// Read app config and eas.json
Read({ file_path: "app.config.js" });
Validate:
version is set in app configautoIncrement: Enabled in production profileFor production builds, warn about version:
ā ļø VERSION CHECK
Current version: 1.0.0
Last released: 1.0.0 (if known)
If this is an update, ensure version is incremented.
Using autoIncrement in eas.json handles build numbers automatically.
iOS Submission Check:
appleId configured in submit profile (or will prompt)ascAppId configured (App Store Connect app ID)Android Submission Check:
serviceAccountKeyPath configuredtrack specified (internal, alpha, beta, production)š± ANDROID FIRST RELEASE REMINDER
------------------------------------------
If this is your first Android release:
1. First AAB must be manually uploaded to Play Console
2. After first upload, --auto-submit will work
3. Download AAB from EAS dashboard after build completes
Generate comprehensive pre-flight report:
============================================
EAS BUILD PRE-FLIGHT CHECK
============================================
Platform: {platform}
Profile: {profile}
Auto-submit: {yes/no}
Date: {date}
š CONFIGURATION
------------------------------------------
ā
eas.json valid
ā
Build profile "{profile}" found
ā
app.config.js valid
ā
Bundle ID: {bundleIdentifier}
ā
Package: {package}
ā
Version: {version}
š CREDENTIALS
------------------------------------------
iOS:
ā
Distribution Certificate: Valid (expires {date})
ā
Provisioning Profile: Valid
ā
Push Notification Key: Configured
Android:
ā
Keystore: Configured
ā
FCM Key: Configured
š ENVIRONMENT
------------------------------------------
ā
APP_VARIANT: {value}
ā
EAS Secrets: 3 configured
ā ļø Check EXPO_PUBLIC_* variables for correct values
š„ PROJECT HEALTH
------------------------------------------
ā
expo doctor: No critical issues
ā
SDK Version: {version}
ā
Dependencies: Up to date
{if auto-submit}
š¤ SUBMISSION
------------------------------------------
iOS:
ā
Apple ID configured
ā
ASC App ID: {ascAppId}
Android:
ā
Service account configured
ā
Track: {track}
{if first release}
ā ļø First release: Manual AAB upload required
{/if}
{/if}
============================================
ā
ALL CHECKS PASSED - READY TO BUILD
============================================
Run this command to start the build:
{command}
============================================
Based on validated parameters, generate the exact command:
Standard build:
eas build --platform {ios|android|all} --profile {profile}
With auto-submit:
eas build --platform {ios|android|all} --profile {profile} --auto-submit
With message:
eas build --platform {ios|android|all} --profile {profile} --message "Build description"
With clear cache (if issues detected):
eas build --platform {ios|android|all} --profile {profile} --clear-cache
If credentials are missing:
š« CREDENTIAL ISSUE DETECTED
------------------------------------------
iOS Distribution Certificate: Missing
To fix, run:
eas credentials --platform ios
Then re-run this build preparation command.
If configuration is invalid:
š« CONFIGURATION ERROR
------------------------------------------
Issue: Build profile "staging" not found in eas.json
Available profiles:
- development
- preview
- production
Either use an existing profile or add "staging" to eas.json.
If expo doctor reports issues:
ā ļø PROJECT HEALTH ISSUES
------------------------------------------
expo doctor reported:
ā react-native version mismatch
Expected: 0.74.0
Found: 0.73.0
Recommended: Run `npx expo install --fix` to resolve
Build may still succeed, but issues could occur.
Proceed anyway? (command will include --clear-cache)
# Development build for iOS simulator
eas build --platform ios --profile development
# Development build for physical iOS device
eas build --platform ios --profile development
# Preview build for internal testing
eas build --platform all --profile preview
# Production build with auto-submit
eas build --platform all --profile production --auto-submit
# Production iOS only, submit to TestFlight
eas build --platform ios --profile production --auto-submit
# Build with clear cache
eas build --platform ios --profile development --clear-cache
| Profile | Use Case | Distribution |
|---|---|---|
| development | Local dev with dev client | internal |
| preview | Testing before production | internal |
| production | App store release | store |
| Platform | What Happens |
|---|---|
| iOS | Uploads to App Store Connect ā TestFlight |
| Android | Uploads to Play Console ā Specified track |
Note: iOS auto-submit works immediately. Android requires first manual upload.