xcode_backend.sh: no such file or directory. Do I need to create this file?

after a lot of messing around, I set these two settings and the build ran on to my physical device.

  • Goto Xcode,

  • click on Runner

  • select Project (top one)

  • go to Info tab

  • change configurations for debug

  • top Runner (green icon) to Generated

  • Bottom Runner (red circles) Pods-Runner-debug


Basically what happens is that one of the project's 'Build Phases' is running a script:

/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" build

Now in order to find xcode_backend.sh the FLUTTER_ROOT variable needs to be defined. It is defined in a file called Flutter/Generated.xcconfig, which is generated when you run flutter pub get or flutter build.

The build configuration files Debug.xcconfig and Release.xcconfig (in the same Flutter folder) include Generated.xcconfig. Now the only thing left is to ensure that for each of the project configurations these build configuration files are properly set (in XCode under Project > Info > Configuration).