FG
📱 Mobile & Cross-PlatformExpo

[expo-constants][iOS] build failed: PhaseScriptExecution [CP-User]\ Generate\ app.config\ for\ prebuilt\ Constants.manifest

Freshabout 21 hours ago
Mar 14, 20260 views
Confidence Score64%
64%

Problem

Summary expo-constants throws 'Command PhaseScriptExecution failed with a nonzero exit code' when building iOS. Managed or bare workflow? If you have `ios/` or `android/` directories in your project, the answer is bare! bare What platform(s) does this occur on? iOS SDK Version (managed workflow only) _No response_ Environment [code block] Reproducible demo This doesn't require any code to reproduce. Just create a new project and build its iOS on XCode. - Step 1 [code block] - Step 2 [code block] - Step 3 [code block] - Step 4 In XCode, select a team for signing - Step 5 Build and wait. - Step 5 Say hi to the error: [code block]

Error Output

Error: No iOS devices available in Simulator.app

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix PhaseScriptExecution Error in iOS Build for Expo Constants

Medium Risk

The error 'Command PhaseScriptExecution failed with a nonzero exit code' occurs due to the absence of available iOS devices in the Simulator.app, which is required for building the project. This can happen if the simulator is not properly set up or if there are no simulators available for the selected device type.

Awaiting Verification

Be the first to verify this fix

  1. 1

    Check Simulator Availability

    Open the Simulator app and ensure that at least one iOS simulator is available and running. If no simulators are available, create a new simulator instance.

    bash
    open -a Simulator
  2. 2

    Create a New Simulator

    If no simulators are available, create a new simulator by navigating to the 'Devices and Simulators' window in Xcode. Click on the '+' button to add a new simulator, select a device type and iOS version.

    bash
    xcrun simctl create 'iPhone 14' com.apple.CoreSimulator.SimRuntime.iOS-16-0
  3. 3

    Select the Correct Simulator in Xcode

    In Xcode, go to the top menu and select 'Product' > 'Destination', then choose the newly created simulator from the list to ensure it is selected for the build.

  4. 4

    Clean Build Folder

    Clean the build folder to remove any cached data that might cause issues. In Xcode, select 'Product' > 'Clean Build Folder' or use the shortcut Shift + Command + K.

  5. 5

    Rebuild the Project

    Attempt to rebuild the project in Xcode by selecting 'Product' > 'Build'. Monitor the build process for any errors.

Validation

Confirm the fix worked by successfully building the project in Xcode without encountering the PhaseScriptExecution error. Additionally, ensure that the selected simulator is running during the build process.

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

exporeact-nativemobileneeds-validation