Search code examples
xcodefluttercocoapods

bin/sh: /Users/xxx(bin/xcode_backend.sh: Not a directory Command PhaseScriptExecution failed with a nonzero exit code


I had problems with the flutter_facebook_login package, more specific with the pod file when building for iOS. After some research I've updated the pod repo, removed the pod.lock file, run pod install and everything installed fine but now I get this error

bin/sh: /Users/xxx(bin/xcode_backend.sh: Not a directory Command PhaseScriptExecution failed with a nonzero exit code

note: Using new build systemnote: Planning buildnote: Constructing build description

... and I have no idea what happens. So far I've locked and unlocked the login in the keychain access, like suggested an answer on stackoverflow, then added Flutter SDK path in User-Defined Settings, following another answer, but the issue persists. Can anyone help me with this, please?


Solution

  • I've figured it out. In Xcode Targets, Project Name (Runner in this case) Build Settings, added new build setting: FLUTTER_ROOT and then the PATH to the flutter directory /Users/user_name/Developer/flutter/ in my case and it works fine.

    Screenshot: enter image description here

    I've followed this answer