Skip to content

Flutter iOS build errorFlutter: “Could not find included file ‘Generated.xcconfig’ in search paths (in target ‘Runner’)”

Building in Xcode, on Xcode Cloud or on another CI fails with Could not find included file ‘Generated.xcconfig’ in search paths. ios/Flutter/Generated.xcconfig isn’t part of your repository; the flutter tool creates it (with your Flutter SDK path and build settings) when it fetches packages or builds. A fresh clone, a flutter clean, or a CI job that starts Xcode directly doesn’t have it yet.

Short answer

Run flutter pub get in the project folder, which writes ios/Flutter/Generated.xcconfig, then cd ios && pod install if you use CocoaPods, and build again. On CI and Xcode Cloud, install Flutter and run flutter pub get (or flutter build ios --config-only) before the Xcode build step.

Why the file is missing, and the fix

  1. 01

    A fresh clone or flutter clean, then a build straight from Xcode

    Xcode doesn’t run the flutter tool before reading the config files. Generate them first, then open the workspace.

    flutter pub get
    cd ios && pod install && cd ..
    open ios/Runner.xcworkspace
  2. 02

    Xcode Cloud or CI builds without running Flutter first

    “Leverage the post-clone custom build script that runs after Xcode Cloud clones your Git repository” Flutter, Continuous delivery with Flutter

    The build machine has your code but not the generated files. Install Flutter, fetch packages and pods in a step that runs before Xcode; on Xcode Cloud that is ios/ci_scripts/ci_post_clone.sh. Commit it as executable (git add --chmod=+x ios/ci_scripts/ci_post_clone.sh), or Xcode Cloud skips it and the error stays.

    #!/bin/sh
    set -e
    cd $CI_PRIMARY_REPOSITORY_PATH
    git clone https://github.com/flutter/flutter.git --depth 1 -b stable $HOME/flutter
    export PATH="$PATH:$HOME/flutter/bin"
    flutter precache --ios
    flutter pub get
    HOMEBREW_NO_AUTO_UPDATE=1 brew install cocoapods
    cd ios && pod install
  3. 03

    The xcconfig files were edited or moved

    ios/Flutter/Debug.xcconfig and Release.xcconfig include Generated.xcconfig by a relative path. If they were changed or the Flutter folder moved, compare them with a fresh flutter create project and restore the include lines.

    // ios/Flutter/Debug.xcconfig
    #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
    #include "Generated.xcconfig"

Checked against the vendor’s docs on : Flutter: Continuous delivery with Flutter (Xcode Cloud post-clone script).

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

Related: Flutter “Flutter/Flutter.h file not found” · Flutter pod install failed · Xcode PhaseScriptExecution failed · flutter: command not found

Questions

More on this error

Should I commit Generated.xcconfig?

No. It contains paths from your own machine, such as the Flutter SDK location, so it would break other machines. Flutter’s default .gitignore leaves it out for that reason.

Is there a way to generate only the iOS config without building?

Yes: flutter build ios --config-only writes the Xcode configuration without compiling the app.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.