flutter Xcode error Command PhaseScriptExecution failed with a nonzero exit code - ios

After I integrated the flutter project into the iOS project, I have to 'clean' it with Xcode every time I run the iOS project, otherwise it will report an error. Error content:
Command PhaseScriptExecution failed with a nonzero exit code

you have to apply or set a minimum deployment target in Xcode or in your project. Xcode will show you a recommended update while building the project just click on it and apply to perform changes and it will automatically change in necessary files

Related

I am facing issues while creating a IOS Build in Nativescript environment "Command Ld failed with a nonzero exit code"

I am facing issues while creating my ios build in the native script environment. This error is in nsld.sh file which is the ios platform file.
I removed the ios platform multiple times and add the platform again but still the same issue every time.
Here is my error:
/Users/mypc/Code/app/MobileApp/mobileApp_nativescript/platforms/ios/internal/nsld.sh: line 60: /Users/mypc/Downloads/Xcode: No such file or directory
Command Ld failed with a nonzero exit code

Failed to package: Command PhaseScriptExecution failed with a nonzero exit code

I am constantly getting the following error when trying to build my Flutter app in Xcode:
Failed to package /Users/Me/yourapp/
Command PhaseScriptExecution failed with a nonzero exit code
Font subsetting is not supported in debug mode. The --tree-shake-icons flag will be ignored.
I am out of options. I tried everything, literally every single of the answer provided in previous answers.
Note:
1 - I first build the app on Windows
2 - Cloned my app on my MacBook via Github
3 - Downloaded Cocoapods
4 - Ran Flutter run
Failed to package /Users/Me/yourapp/
Command PhaseScriptExecution failed with a nonzero exit code
And there is the error.
Edit:
Font subsetting is not supported in debug mode. The --tree-shake-icons flag will be ignored.
Is what I get now...
How can we solve this?
Note: working on an older MacBook (2014) and my device (iPhone) is plugged in. Both the device as well as simulator are not working.
Try to do:
flutter create .
You have to do this in your main project folder. Remove any ios folder if there is one and make sure you do the command with the dot.
Should work.
It will solve it for sure. Both of your questions are related to the same topic.

Command PrecompileSwiftBridgingHeader failed with a nonzero exit code

I am developing swift project using some objective-c files via "bridge-header-file".Its working fine for first time. I just close the xcode and reopen my project and i run it. But not working...showing "Command PrecompileSwiftBridgingHeader failed with a nonzero exit code"
Please help me
Check the Path in
Target -> Built Settings -> Objective-C Bridging Header
Correcting the path works for me in Xcode 12.

Xcode 11.2.1 error: Command CompileSwiftSources failed with a nonzero exit code

I've downloaded the latest Xcode 11.2.1. When I build I'm getting this error.
<unknown>:0: error: using bridging headers with module interfaces is unsupported
Command CompileSwiftSources failed with a nonzero exit code
How can I resolve this?
I solved this build error by setting Build Options -> Build Libraries for Distribution in the targets Build Settings to No.
I stumbled upon this config change that worked for me so I don't have any evidence/research to back up why it works. And I have only tried this for debug builds, will update my answer if anything changes. Your milage may vary.
My project specs below:
Xcode 11.1 (11A1027)
Brownfield React Native iOS app

Xcode 10 Alamofire Command PhaseScriptExecution failed with a nonzero exit code

Failing to build an Xcode project for the first time with Alamofire and SwiftyJSON. Getting the error:
Code Signing /Users/tc/Library/Developer/Xcode/DerivedData/Theo's_App-dettsmkxqclxnkgyvtofbjnhseyp/Build/Products/Debug-iphonesimulator/Theo's App.app/Frameworks/Alamofire.framework with Identity -
/usr/bin/codesign --force --sign - --preserve-metadata=identifier,entitlements '/Users/tc/Library/Developer/Xcode/DerivedData/Theo's_App-dettsmkxqclxnkgyvtofbjnhseyp/Build/Products/Debug-iphonesimulator/Theo's App.app/Frameworks/Alamofire.framework'
/Users/tc/Library/Developer/Xcode/DerivedData/Theos_App-dettsmkxqclxnkgyvtofbjnhseyp/Build/Products/Debug-iphonesimulator/Theos App.app/Frameworks/Alamofire.framework: No such file or directory
Command PhaseScriptExecution failed with a nonzero exit code
Tried finding similar issues online and doing their solutions but build keeps failing.
#Cœur, I was facing the same issue with Xcode 10 recently. Not sure if it will work for you.
Try to close Xcode, and open your project xxx.xcworkspace from the finder instead of the xcode recent project panel.
Seems like there's a bug in Xcode 10.

Resources