error: 'Flutter/Flutter.h' file not found when flutter run on iOS
Solution 1:
A way easier solution:
- Remove ios/Flutter/Flutter.podspec:
rm ios/Flutter/Flutter.podspec
flutter clean
- Run your app again.
Taken from here
Solution 2:
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