简体   繁体   中英

Unable to use flutter_inappwebview plugin with Xcode 14

Environment

Technology Version
Flutter version 3.3.7
Plugin version 5.7.1
Android version not relevant
iOS version 12.5.6
Xcode version 14.1

Device information:

Description

The plugin is giving lot of errors for many classes that are available only on iOS version greater than 14.0 and 14.1 . While the same was working fine in Xcode 13 . Please let me know what need to do

Expected behavior: It should not give any error on Xcode 14 Current behavior: The plugin does not seems working. It is giving errors in many files and on resolving them it starts to show in respective files where those classes are used.

Steps to reproduce

Update the Xcode to version 14 and try to use the plugin in Flutter project. It will not allow to run the app. VSCode中显示的这种错误

在 Xcode 中打开它显示此错误,解决此问题后还有其他依赖项开始显示错误

I was perfectly using the plugin with Xcode 13 . But after updating to Xcode 14 it started to give the error. Please suggest me a solution how to resolve it.

I checked again the error. Basically when we use this plugin Xcode shows error only for this plugin. But there is compatibility issues with Xcode 14 for all other plugins also. So you need to follow the below steps to fix the issue.

  1. Update flutter SDK to the latest version. I used 3.3.7. Because 3.3.8 is release today only.
  2. You need to update all plugins with their latest version. Resolve the conflicts between plugin versions and try to keep most updated and compatible plugin version
  3. Most importantly, Xcode failed the build because project was using functionality of plugin "modal_bottom_sheet" and Xcode was unable to find this plugin. So add this plugin in your project and try to add using "flutter pub add..." command.
  4. Xcode has made it mandatory to enable Bitcode for product Runner and Pods. So open Pods project and Enable Bitcode. It will enable for all the Targets.
  5. After that Run your app on Simulator only, having iOS version 16, that came with Xcode 14. Xcode 14 is currently not allowing to run app on real devices.
  6. By running it once it will update all your flutter project settings.
  7. Then you can also proceed to create Archive and share your app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM