Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 16.1: Command PhaseScriptExecution failed with a nonzero exit code

I have a flutter app that was uploaded back on 2022 and last month I had to update to Xcode 16.1 and macOS 15.2 same flutter version 3.3.2 since Apple does not want me to upload the app with my previous Xcode and macOS version. Now I'm getting an error on flutter run and xcode run Failed to package /Users/bonfire/Desktop/Projects/{APPNAME}.Command PhaseScriptExecution failed with a nonzero exit code.

I have done and tested many things

cd ios
rm -rf Pods Podfile.lock
pod deintegrate
pod setup
pod install --repo-update
cd ..
flutter clean
flutter pub get

Xcode 16.1, macOS 15.2, Flutter 3.3.2

Full log here

Git hub related issue here

Issue

like image 377
Vincent Dave Navares Te Avatar asked Dec 17 '25 21:12

Vincent Dave Navares Te


1 Answers

I got my problem solved and it works fine, I'm using Xcode 16.2, mac M1


post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
      config.build_settings['ENABLE_BITCODE'] = 'NO'
      
      config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
      config.build_settings['ARCHS'] = '$(ARCHS_STANDARD)'
      
      if config.name.include?("Debug")
        if config.name.include?("Simulator")
          config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "i386"
        else
          config.build_settings["EXCLUDED_ARCHS[sdk=iphoneos*]"] = ""
        end
      end
    end
  end
end
like image 180
Himanshu Visroliya Avatar answered Dec 19 '25 12:12

Himanshu Visroliya



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!