I'm trying to run Flutter app on iOS on Mac. When I'm trying to build project, it gives me this error:
Xcode's output: ↳ === BUILD TARGET shared_preferences OF PROJECT Pods WITH CONFIGURATION Debug === In file included from /Users/(username)/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.2.4/ios/Classes/SharedPreferencesPlugin.m:5: /Users/(username)/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.2.4/ios/Classes/SharedPreferencesPlugin.h:1:9: fatal error: 'Flutter/Flutter.h' file not found #import ^~~~~~~~~~~~~~~~~~~ 1 error generated. Could not build the application for the simulator.
I've tried to build it from different Flutter channels, no change.
Any idea what is wrong?
EDIT: flutter version 0.2.8 pod version 1.5.0
https://github.com/flutter/flutter/issues/16036#issuecomment-380712094 provides instructions that seemed to have worked for others
Can I ask you to try the following:
- make sure you have Cocoapods 1.5.0 installed (
pod --version
should say1.5.0
)- change any dependencies you have on the
firebase_xxx
,google_sign_in
, orcloud_firestore
plugins to the newest versions (look for changelog entries referring to Cocoapods 1.5.0)- change your
ios/Podfile
to the newest version on Flutter master branch (https://github.com/flutter/flutter/tree/master/packages/flutter_tools/templates/cocoapods)- delete
ios/Podfile.lock
andios/Pods
switch to Flutter master branchflutter clean ; flutter run
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With