Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: 'Flutter/Flutter.h' file not found #import <Flutter/Flutter.h> #78

Closed
moesaeed opened this issue May 17, 2018 · 3 comments
Closed

Comments

@moesaeed
Copy link

With flutter_webview_plugin: ^0.1.5 && latest Flutter update, I got the following error

Failed to build iOS app
Could not build the application for the simulator.
Error output from Xcode build:
Error launching application on iPhone X.

** BUILD FAILED **

Xcode's output:

=== BUILD TARGET flutter_webview_plugin OF PROJECT Pods WITH CONFIGURATION Debug ===
In file included from /Users/app/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.1.5/ios/Classes/FlutterWebviewPlugin.m:1:
/Users/app/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.1.5/ios/Classes/FlutterWebviewPlugin.h:1:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.

APPs-MacBook-Pro:ios app$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v0.4.5-pre.37, on Mac OS X 10.12.6 16G1212, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 9.2)
[✓] Android Studio (version 3.0)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] IntelliJ IDEA Community Edition (version 2017.3.5)
[✓] Connected devices (1 available)

• No issues found!

@moesaeed
Copy link
Author

I had to remove flutter_webview_plugin: ^0.1.5 from pubspec.yaml and then run
pod deintegrate
on iOS project

@js1972
Copy link
Contributor

js1972 commented May 18, 2018

For that error I find the following fixes work:

Copy a suitable profile from Flutter Master (https://github.com/flutter/flutter/tree/master/packages/flutter_tools/templates/cocoapods) to your projects iOS/Podfile and delete iOS/Podfile.lock.
Use the ObjC version if your project wasn’t created with -I swift.
This solution is from Flutter issue flutter/flutter#16036.

@AngusFu
Copy link

AngusFu commented May 21, 2018

@js1972 thx, it really works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants