Flutter iOS fatal error: 'Flutter/Flutter.h' file not found

Viewed 3057

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.```
2 Answers

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.

Open your project folder in terminal, and run flutter build ios.

Related