Error: Could not find included file 'Generated.xcconfig' in search paths (in target 'Runner')

IosXcodeFlutterFlutter Build

Ios Problem Overview


I have created a Flutter project in Android Studio. It runs fine on Android devices but when I try to run it on Xcode, I get an error as:

> Build system information error: > /Users/Downloads/flutter_wallpaper-master > 2/ios/Flutter/Debug.xcconfig:1: could not find included file > 'Generated.xcconfig' in search paths (in target 'Runner')

Can anyone help me with how to solve this issue?

Ios Solutions


Solution 1 - Ios

Try running flutter build ios and then rerun in Xcode

Solution 2 - Ios

I assume you have already ios/ folder in your Flutter project. If not, you can run flutter build ios.

The root cause of this error most of the times happens after you have cloned a project like from Github.

In order to fix, you need to get the packages and install the pods.

flutter clean && flutter pub get && cd ios/ && pod install 

(In some situation you might need to update your Pod Repo and Pods. You can do that via running pod repo update && pod update)

Solution 3 - Ios

Please follow these steps/run commands

  1. flutter clean (in terminal)
  2. flutter build (in terminal)
  3. In Xcode, then clean project
  4. In Xcode, then build project

The error should have gone now :)

Solution 4 - Ios

Why does this error occur?

This error occurred when creating multiple builds types for App. Development and production build on 2 different firebase server. After we have done with all the setup and tried to run the build it, this error pops up on Xcode.

The solution to this depends on what steps you took before this error arrives

  1. If you are getting this error without running flutter build ios then first try to this

    1. Run  flutter build ios to create a release build

    2. To ensure that Xcode refreshes the release mode configuration, close and re-open your Xcode workspace. For Xcode 8.3 and later

 

  1. If you use flutter build ios when you receive the error? then try to this Solution

    On Terminal type:

    flutter clean
    flutter build
    

    And on Xcode:

    Product >> Clean Build Folder
    Product >> Build
    

Solution 5 - Ios

After few hours of search, this solved my issue.

Firstly, run flutter doctor to check if all the dependencies checked. Follow the instructions shown on the terminal if those [] boxes are not completed as [ticked].

flutter channel master
flutter doctor

Then, run this line.

flutter pub get

Lastly, use the following code to rebuild your ios path (assume your ios codes are stored in /ios folder of your project). This step already included the pod install procedure. No need for further pod install execution.

flutter build ios --release --no-codesign

Solution 6 - Ios

1.) flutter clean 2.) flutter pub get 3.) cd iOS 4.) pub update 5.) flutter run

=> should solve the problem.

If not -> delete the podfile and repeat the process.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSwift GuyView Question on Stackoverflow
Solution 1 - IosAustin ChenView Answer on Stackoverflow
Solution 2 - IosCanberk SinangilView Answer on Stackoverflow
Solution 3 - IosJaved IqbalView Answer on Stackoverflow
Solution 4 - IosParesh MangukiyaView Answer on Stackoverflow
Solution 5 - Ios21.kawView Answer on Stackoverflow
Solution 6 - IosCan KaplanView Answer on Stackoverflow