[Solved] error: ‘Flutter/Flutter.h’ file not found when flutter run on iOS

Hello Guys How are you all? Hope You all are fine. When I was trying to run my flutter app and suddenly I get the following error in my stack track.error: ‘Flutter/Flutter.h’ file not found when flutter run on iOS in flutter. So today Here I come with all possible solutions for this error.

We are providing you all possible solutions to solve this error. let’s start this article without wasting your time.

How error: ‘Flutter/Flutter.h’ file not found when flutter run on iOS Error Occurs ?

I can’t build or run the App in macos. Same code is runnable in android. Here is my Stacktrack output.

Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running Xcode build...                                                  
Xcode build done.                                           11.4s
Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    <module-includes>:1:9: note: in file included from <module-includes>:1:
    #import "Headers/vibration-umbrella.h"
            ^
    /Users/leo/Apps/previate_esta/ios/Pods/Target Support Files/vibration/vibration-umbrella.h:13:9: note:
    in file included from /Users/leo/Apps/previate_esta/ios/Pods/Target Support
    Files/vibration/vibration-umbrella.h:13:
    #import "VibrationPlugin.h"
            ^
    /Users/leo/.pub-cache/hosted/pub.dartlang.org/vibration-1.4.0/ios/Classes/VibrationPlugin.h:1:9: error:
    'Flutter/Flutter.h' file not found
    #import <Flutter/Flutter.h>

How to Solve error: ‘Flutter/Flutter.h’ file not found when flutter run on iOS?

  1. How to Solve error: 'Flutter/Flutter.h' file not found when flutter run on iOS?

    To solve error: 'Flutter/Flutter.h' file not found when flutter run on iOS error Just remove ios/Flutter/Flutter.podspec: rm ios/Flutter/Flutter.podspec Then run flutter clean Run your app again. Boom! Your Error might be solved.

  2. error: 'Flutter/Flutter.h' file not found when flutter run on iOS

    To solve error: 'Flutter/Flutter.h' file not found when flutter run on iOS error Just remove ios/Flutter/Flutter.podspec: rm ios/Flutter/Flutter.podspec Then run flutter clean Run your app again. Boom! Your Error might be solved.

Solution 1

It’s happening caused by switching from master/dev back to beta/stable. This Solution is worked for me. But make sure to Backup ios/Runner folder before running any commend.

  1. Just remove ios/Flutter/Flutter.podspecrm ios/Flutter/Flutter.podspec
  2. Then run flutter clean
  3. Run your app again.
  4. Boom! Your Error might be solved.

Solution 2

The following commands fixed this behavior:

  1. cd ios for going to iOS directory of the flutter app
  2. pod deintegrate
  3. rm Flutter/Flutter.podspec
  4. rm podfile.lock
  5. flutter clean
  6. flutter run

Solution 3

Just switch the channel from Master to stable. to switch your channel, run this in your terminal:

  1. flutter channel stable
  2. flutter clean
  3. flutter run

Solution 4

Changing PodFile from:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
    config.build_settings['ENABLE_BITCODE'] = 'NO'
    config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '10.0'
    end
  end
end

to

post_install do |installer|
  installer.pods_project.targets.each do |target| 
    flutter_additional_ios_build_settings(target)
  end
end

Summery

So, It’s All About error: ‘Flutter/Flutter.h’ file not found when flutter run on iOS. I hope this tutorial helps you to solve your error. Please Comment Below if You stucks anywhere with my code.

Also Check Out Below Tutorials

1 thought on “[Solved] error: ‘Flutter/Flutter.h’ file not found when flutter run on iOS”

Leave a Comment

  Canva Pro Crack Filmora Pro Crack Spotify Premium Free Download Tradingview Premium Free