'Flutter iOS fatal error: 'Flutter/Flutter.h' file not found
When I try to build my iOS I was facing such error I think it's mostly with the webview_flutter package
Failed to build iOS app
Error output from Xcode build:
↳
In file included from /Users/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-2.0.14/ios/Classes/JavaScriptChannelHandler.m:5:
/Users/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-2.0.14/ios/Classes/JavaScriptChannelHandler.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.
In file included from /Users/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-2.0.14/ios/Classes/FLTWebViewFlutterPlugin.m:5:
/Users/Development/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-2.0.14/ios/Classes/FLTWebViewFlutterPlugin.h:5:9: fatal error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^~~~~~~~~~~~~~~~~~~
1 error generated.```
Solution 1:[1]
Have you deleted XCode build cache?
in that case, it can be easily solved with overwriting ios folder from your previous commit, or delete all auto generated files inside it.
Solution 2:[2]
Open your project folder in terminal, and run flutter build ios
.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Lou |
Solution 2 | Russ Westwood |