You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m new here with only a few weeks experience so I'm seeking help with an iOS build error that has persisted despite extensive troubleshooting. I’ve spent days trying to resolve this on an M4 MacBook Air using Flutter and Xcode, and I’m hoping someone here has experience with this scenario or a fresh set of eyes. I was building the app successfully with the assistance of chatgpt and somewhere along the lines things got messed up. I made some changes manually to Xcode as suggested by openAi, however nothing seems to fix the issue.
❗ Error Summary
Every time I try to build for iOS (either through flutter build ios or Xcode), I get:
Command PhaseScriptExecution failed with a nonzero exit code
💻 System Details
✅ Mac: M4 MacBook Air, macOS Sequoia15.5
✅ Flutter: Stable channel
✅ Xcode: Version 16.4 (16F6) (via App Store)
✅ Project: Flutter app with Firebase + Firestore + url_launcher
✅ Using: Rosetta Terminal for compatibility with CocoaPods
✅ What I’ve Already Tried (Exhaustively):
🔧 Flutter & Pod Fixes
flutter clean
flutter pub get
arch -x86_64 pod install --repo-update
Verified Generated.xcconfig exists
Checked .xcworkspace is used (not .xcodeproj)
Regenerated the iOS folder and reconfigured everything
🧪 Build Environment
Switched to use_frameworks! :linkage => :static in Podfile
Reset .gitignore to exclude sensitive folders only
Cleaned DerivedData via:
rm -rf ~/Library/Developer/Xcode/DerivedData
Verified iOS Deployment Target is 13.0+
Used flutter build ios --no-codesign
🛠 Xcode Manual Adjustments
Added missing “Embed Flutter Frameworks” build phase
Reordered build phases as suggested in Flutter docs
Ensured base configurations point to the correct .xcconfig files
🔁 Reinstall Steps
✅ Uninstalled and reinstalled Xcode
✅ Deleted iOS platform folder and rebuilt it
🔍 Output from flutter doctor -v
[✓] Flutter (Channel stable, 3.22.1, on macOS 14.5 23F79 darwin-arm64, locale en-VC)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.90.2)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
🙏 What I’m Asking
Has anyone experienced this on an M-series Mac (especially M4)?
Could this be a Flutter tools bug, Xcode regression, or path config error?
Is a Flutter or CocoaPods-specific workaround available?
Thank you!
Any help, links, or insights from the community are greatly appreciated!
Feel free to fork the repo or run tests directly.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Flutter Community,
I’m new here with only a few weeks experience so I'm seeking help with an iOS build error that has persisted despite extensive troubleshooting. I’ve spent days trying to resolve this on an M4 MacBook Air using Flutter and Xcode, and I’m hoping someone here has experience with this scenario or a fresh set of eyes. I was building the app successfully with the assistance of chatgpt and somewhere along the lines things got messed up. I made some changes manually to Xcode as suggested by openAi, however nothing seems to fix the issue.
❗ Error Summary
Every time I try to build for iOS (either through flutter build ios or Xcode), I get:
Command PhaseScriptExecution failed with a nonzero exit code
💻 System Details
✅ Mac: M4 MacBook Air, macOS Sequoia15.5
✅ Flutter: Stable channel
✅ Xcode: Version 16.4 (16F6) (via App Store)
✅ Project: Flutter app with Firebase + Firestore + url_launcher
✅ Using: Rosetta Terminal for compatibility with CocoaPods
✅ What I’ve Already Tried (Exhaustively):
🔧 Flutter & Pod Fixes
flutter clean
flutter pub get
arch -x86_64 pod install --repo-update
Verified Generated.xcconfig exists
Checked .xcworkspace is used (not .xcodeproj)
Regenerated the iOS folder and reconfigured everything
🧪 Build Environment
Switched to use_frameworks! :linkage => :static in Podfile
Reset .gitignore to exclude sensitive folders only
Cleaned DerivedData via:
rm -rf ~/Library/Developer/Xcode/DerivedData
Verified iOS Deployment Target is 13.0+
Used flutter build ios --no-codesign
🛠 Xcode Manual Adjustments
Added missing “Embed Flutter Frameworks” build phase
Reordered build phases as suggested in Flutter docs
Ensured base configurations point to the correct .xcconfig files
🔁 Reinstall Steps
✅ Uninstalled and reinstalled Xcode
✅ Deleted iOS platform folder and rebuilt it
📎 GitHub Repo for Testing
This repo includes a minimal, reproducible example of the issue:
👉 https://github.com/MrTolaMan/PhaseScriptExecution
🔍 Output from flutter doctor -v
[✓] Flutter (Channel stable, 3.22.1, on macOS 14.5 23F79 darwin-arm64, locale en-VC)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.90.2)
[✓] Connected device (3 available)
[✓] Network resources
• No issues found!
🙏 What I’m Asking
Has anyone experienced this on an M-series Mac (especially M4)?
Could this be a Flutter tools bug, Xcode regression, or path config error?
Is a Flutter or CocoaPods-specific workaround available?
Thank you!
Any help, links, or insights from the community are greatly appreciated!
Feel free to fork the repo or run tests directly.
Beta Was this translation helpful? Give feedback.
All reactions