Command PhaseScriptExecution failed with a nonzero exit code while trying to add Flutter to iOS app Command PhaseScriptExecution failed with a nonzero exit code while trying to add Flutter to iOS app dart dart

Command PhaseScriptExecution failed with a nonzero exit code while trying to add Flutter to iOS app


This work for me Thanks Alexander Lozano, I upload image for Xcode Version 12.0.1

Xcode Version 12.0.1


this works for me: xcode 11.3.1.

xcode ->targets->runner

in build phases: run script and thin binary, select: run script only when installing


This worked for me:
1) Add this to your podfile:

flutter_application_path = '/Users/dhavalkansara/FlutterToNative/AFE_flutter/'    eval(File.read(File.join(flutter_application_path, '.ios', 'Flutter', 'podhelper.rb')), binding)    install_all_flutter_pods(flutter_application_path)

PS. You may also need to do that for each target, i.e

target 'AFEiOSTests' do    inherit! :search_paths    install_all_flutter_pods(flutter_application_path)    # Pods for testing  end  target 'AFEiOSUITests' do    inherit! :search_paths    install_all_flutter_pods(flutter_application_path)    # Pods for testing  end

2) Run pod install