error: 'Flutter/Flutter.h' file not found when flutter run on iOS
I found a solution!
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
This solution worked for me:
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
A way easier solution:
- Remove ios/Flutter/Flutter.podspec:
rm ios/Flutter/Flutter.podspec
flutter clean
- Run your app again.
Taken from here