flutter - 如何在 Flutter 中在 iOS 上运行 Webview
问题描述
我已经将这些用于库:
webview_flutter: ^2.0.8
webview_cookie_manager: ^2.0.0
我正在尝试在我的应用程序的一个部分中显示一个网页。到目前为止,它在 Android 上运行良好,但是当我尝试在 iOS 上运行它时,它给了我一个错误。这是我的控制台日志:
在调试模式下在 iPhone 12 Pro Max 上启动 lib/main.dart... 运行 pod install... 1,097 毫秒 CocoaPods 的输出:↳ 准备中
Analyzing dependencies Inspecting targets to integrate Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``) Fetching external sources -> Fetching podspec for `Flutter` from `Flutter` -> Fetching podspec for `webview_cookie_manager` from `.symlinks/plugins/webview_cookie_manager/ios` -> Fetching podspec for `webview_flutter` from `.symlinks/plugins/webview_flutter/ios` Resolving dependencies of `Podfile` CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update [!] CocoaPods could not find compatible versions for pod "webview_cookie_manager": In Podfile: webview_cookie_manager (from `.symlinks/plugins/webview_cookie_manager/ios`) Specs satisfying the `webview_cookie_manager (from `.symlinks/plugins/webview_cookie_manager/ios`)` dependency were found, but they required a higher minimum deployment target. /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:32 8:in `raise_error_unless_state' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:31 0:in `block in unwind_for_conflict' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:30 8:in `tap' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:30 8:in `unwind_for_conflict' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:68 4:in `attempt_to_activate' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:25 4:in `process_topmost_state' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:18 2:in `resolve' /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:i n `resolve' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:94: in `resolve' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analy zer.rb:1074:in `block in resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface. rb:64:in `section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analy zer.rb:1072:in `resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analy zer.rb:124:in `analyze' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:41 4:in `analyze' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:23 9:in `block in resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface. rb:64:in `section' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:23 8:in `resolve_dependencies' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:16 0:in `install!' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/command/install .rb:52:in `run' /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/command.rb:52:i n `run' /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/bin/pod:55:in `<top (required)>' /usr/local/bin/pod:23:in `load' /usr/local/bin/pod:23:in `<main>'
CocoaPods 的错误输出:↳</p>
[!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
运行 pod install 时出错 在 iPhone 12 Pro Max 上启动应用程序时出错。
我该如何解决这个问题?
解决方案
推荐阅读
- java - Apache箭头可以支持无限级嵌套结构吗?
- neo4j - 将 URL 查询转换为节点
- jquery - iframe 上的 jQuery 和 postMessage
- excel - 公式 excel 按代码显示名字或姓氏
- arrays - 在ruby中将字符串转换为数组?
- java - 无法在 java poi 中读取 excel 文件(.xls)
- python-2.7 - 如何使用 python 在 IBM MQ 上插入压缩字节消息?(我试过 PYMQI 和 Spring Python)
- symfony - 如何在 Symfony 4 中注销被禁止或更改的用户?
- windows - 无法使用 AutoIt 检查或单击工具栏按钮
- java - 如何将 @OnetoMany 与 Embeddedid 一起使用