Reputation: 227
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
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
Upvotes: 6
Views: 8725
Reputation: 3911
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 your ios
folder).
Paste your Runner backup in the ios
folder (into the project).
Open Runner.xcworkspace
(into ios
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 the Runner
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
Upvotes: 4