Obscure Xcode Error: Executable Path is a Directory #156938
Replies: 3 comments 2 replies
-
|
means Xcode is trying to run a directory (Myapp.app) as if it were an executable binary. This can happen when your app bundle structure is corrupted, misnamed, or the binary inside is missing. -
Then, go to Product > Clean Build Folder Or manually:
Ensure the correct runnable target is selected (it should be your app target, not a framework or a test target).
Do you see an actual binary like Myapp in there? If not, the build didn't produce the executable. |
Beta Was this translation helpful? Give feedback.
-
|
You’ve built… a folder. Info.plist ✅ And now macOS sees this sad empty .app and goes: That “crossed out” icon means macOS considers this .app invalid — likely because the actual binary file is missing, corrupted, or failed code-signing. 🩺 Diagnosis Checklist Cleaning build folder (Shift + Cmd + K) Nuking DerivedData (rm -rf ~/Library/Developer/Xcode/DerivedData) Checking the .app structure manually (and yep, the binary's MIA) Let’s go deeper: Next Steps
Under Architectures, ensure it's not set to "Standard Architectures (64-bit Intel)" only if you're on Apple Silicon Try switching to "arm64" or "arm64 and x86_64"
Make sure main.swift, AppDelegate.swift, etc., are in there
The simulator can get weird in macOS betas. Try: Or: Plug in a physical device and run the build there instead
Code signing fails Team/provisioning profile is missing Or entitlements don’t match the target type Look in the Issue Navigator (⌘ + 4) for any non-fatal build warnings Lemme know if any of that helps! |
Beta Was this translation helpful? Give feedback.
-
|
I have exactly the same issue on iOS Simulator (All versions of iOS, I mean iOS-17,iOS-18) when run the code Xcode-16 . |
Beta Was this translation helpful? Give feedback.







Uh oh!
There was an error while loading. Please reload this page.
-
Body
My build succeeded but I immediately got the following pop-up error:
Executable Path is a Directory
Domain: DVTMachOErrorDomain
Code: 5
Recovery Suggestion: /Users/myname/Library/Developer/Xcode/DerivedData/Myapp-dwsmxozkmjfflagroxubgbfvahwq/Build/Products/Debug-iphonesimulator/Myapp.app is not a valid path to an executable file.
User Info: {DVTErrorCreationDateKey = "2025-04-17 11:54:27 +0000"}
Executable Path is a Directory
Domain: DVTMachOErrorDomain
Code: 5
Recovery Suggestion: /Users/myname/Library/Developer/Xcode/DerivedData/Myname-dwsmxozkmjfflagroxubgbfvahwq/Build/Products/Debug-iphonesimulator/Myname.app is not a valid path to an executable file.
System Information
macOS Version 15.5 (Build 24F5053f)
Xcode 16.3 (23785) (Build 16E140)
Applied and Failed Fixes:
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions