dwyl / learn-flutter

🦋 Learn how to use Flutter to Build Cross-platform Native Mobile Apps
https://flutter.dev
GNU General Public License v2.0
87 stars 8 forks source link

Could not build the application for the simulator. Error launching application on iPhone #97

Open nelsonic opened 1 year ago

nelsonic commented 1 year ago

Just tried to run our App on localhost with:

flutter run

Got:

Launching lib/main.dart on iPhone SE (3rd generation) in debug mode...
Running Xcode build...
Xcode build done.                                            4.7s
Failed to build iOS app
Error (Xcode): type argument 'nw_proxy_config_t' (aka 'struct nw_proxy_config *') is neither an Objective-C object nor a block type
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h:119:46

Parse Issue (Xcode): Could not build module 'WebKit'
/app/build/ios/Debug-iphonesimulator/flutter_inappwebview/flutter_inappwebview.framework/Headers/flutter_inappwebview-Swift.h:285:8

Parse Issue (Xcode): Could not build module 'WebKit'
/app/build/ios/Debug-iphonesimulator/flutter_inappwebview/flutter_inappwebview.framework/Headers/flutter_inappwebview-Swift.h:893:8

Uncategorized (Xcode): Command SwiftEmitModule failed with a nonzero exit code

Could not build the application for the simulator.
Error launching application on iPhone SE (3rd generation).

@LuchoTurtle were you able to run the App on the Simulator using iOS 17?

LuchoTurtle commented 1 year ago

I'm using the physical iPhone S for testing. But I can get it to work on my simulator. Have you tried this comment? https://github.com/pichillilorenzo/flutter_inappwebview/issues/1735#issuecomment-1699023475

This seems to be related to the unwarranted XCode upgrade that was mentioned a few weeks ago.

navdeep22 commented 1 year ago

Use the latest version of flutter_inappwebview. ie. flutter_inappwebview: ^5.8.0. They have fixed the issue in the latest version

nelsonic commented 1 year ago

@navdeep22 thanks very much for letting us know. ❤️