Flutter fatal error: 'Flutter/Flutter.h' file not found
Try Raffaelli L.C. answer:
-
Backup
ios/Runner
folder. -
Delete the
ios
folder. -
Run
flutter create (your project name)
. in the previous folder where you have your project(cd users/user/"projects_folder"
) (this will recreate yourios
folder). -
Paste your Runner backup in the
ios
folder (into the project). -
Open
Runner.xcworkspace
(intoios
folder) and there, check the Version, the Bundle ID, all the info. -
(If do you Have Firebase, you have to copy and paste again the Google
Service-Info.Plist
into theRunner
folder (Always through Xcode) (If do you do this manually, it doesn't work).
Finally, flutter run
and should work!
If flutter run
fails:
cd ios
pod install
cd ..
flutter run
Sulfy
Updated on January 01, 2023Comments
-
Sulfy over 1 year
I am unable to build flutter project for iOS , gives me error as follows
Xcode's output: ↳ In file included from /Users/sulfy/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.5/ios/Classes/FLTPathProviderPlugin.m:5: /Users/sulfy/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.5/ios/Classes/FLTPathProviderPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found #import <Flutter/Flutter.h> ^~~~~~~~~~~~~~~~~~~ 1 error generated. note: Using new build system note: Planning note: Build preparation complete note: Building targets in parallel
tried
- pod deintegrate
- rm ios/Flutter/Flutter.podspec
- flutter clean
- flutter pub get
- pod install
- Clean derive data
- flutter run
and still same, I am unable to get rid of this error. I even tried removing path provider plugin from pubsec.yaml
Any help will be high appreciated as I'm stuck on this over 24 hours
-
Sulfy over 2 yearsThank You, I have been stuck on this for long