pichillilorenzo / flutter_inappwebview

A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
https://inappwebview.dev
Apache License 2.0
3.22k stars 1.58k forks source link

'flutter_inappbrowser/flutter_inappbrowser-Swift.h' file not found #130

Open shijianzhong opened 5 years ago

shijianzhong commented 5 years ago

ng/.pub-cache/hosted/pub.flutter-io.cn/flutter_inappbrowser-1.2.1/ios/Cl asses/InAppBrowserFlutterPlugin.m:19:9: fatal error: 'flutter_inappbrowser/flutter_inappbrowser-Swift.h' file not found

import <flutter_inappbrowser/flutter_inappbrowser-Swift.h>

        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
akshatjagga commented 5 years ago

Hi @shijianzhong,

Did you find how to fix his?

Thanks

pichillilorenzo commented 4 years ago

Try to clean the project and install the latest version of this plugin. Also, this plugin changed its name to flutter_inappwebview. The current latest version now is 2.1.0+1. So, you can change your dependency influtter_inappwebview: ^2.1.0+1.

dudizimber commented 4 years ago

I have the same problem...

/Users/Admin/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-2.0.1+1/ios/Classes/InAppWebViewFlutterPlugin.m:19:9: fatal error: 'flutter_inappwebview-Swift.h' file not found
#import <flutter_inappwebview-Swift.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

flutter_inappwebview: ^2.0.1+1 Xcode 11.3

andre-arsenault commented 4 years ago

I'm having the same problem:

/Users/andre/Development/flutter/.pub-cache/git/flutter_inappwebview-9c7ac0da8f01ceb40430da58397bdb31968ca5b1/ios/Classes/InAppWebViewFlutterPlugin.m:19:9: fatal error: 'flutter_inappwebview/flutter_inappwebview-Swift.h' file not found
#import <flutter_inappwebview/flutter_inappwebview-Swift.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

I am using this plugin (direct from master) as a work-around for this issue, as mentioned here. This solves the Android crash, but now I can't build on iOS!

My Flutter project is Swift-based for iOS.

Any solutions out there?

VeeTsien commented 4 years ago

Same issue here. This is the error message from Xcode 11.2:

/Users/veratsien/Development/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-4.0.0+4/ios/Classes/InAppWebViewFlutterPlugin.m:19:9: 'flutter_inappwebview/flutter_inappwebview-Swift.h' file not found

Any troubleshooting we can try out?

MeshkaniMohammad commented 4 years ago

same here

SimonRijn commented 4 years ago

Same here

LailaiMaster commented 4 years ago

Same here

LailaiMaster commented 4 years ago

I solved 1.your project/ios/Podfile use_frameworks! ,run . `target 'Runner' do use_frameworks! use_modular_headers!

Flutter Pod`

If this problem occurs: "target has transitive dependencies that include statically linked binaries" 2.find this library,pod/xxx.podspec ,add “s.static_framework=true”

A new Flutter plugin. DESC s.homepage = 'http://lllgm.com' s.license = { :file => '../LICENSE' } s.author = { 'Your Company' => '527639282@qq.com' } s.source = { :path => '.' } s.source_files = 'Classes/*/' s.public_header_files = 'Classes/*/.h' s.dependency 'Flutter' s.dependency 'AlipaySDK-iOS' s.platform = :ios, '8.0' s.static_framework=true #add it

VeeTsien commented 4 years ago

Adding use_frameworks! and use_modular_headers! worked!!!

Thank you thank you thank you!!! @LailaiMaster

(Although being able to build on iOS has brought some UI problems into daylight 😂 More bugs to fix)

LailaiMaster commented 4 years ago

@VeeTsien No thanks 😁

llama95 commented 3 years ago

@LailaiMaster first step worked for me thanks :)

AAChartModel commented 3 years ago

Add use_frameworks! into your Podfile , Just like this.

image

That's all. Thanks @LailaiMaster