xcode - 似乎无法将 UIWebView 升级到 WKWebView
问题描述
我目前正在尝试将 Objective C 中的 IOS 应用程序从 UIWebView 升级到 WKWebView。到目前为止我没有运气。
该应用程序当前需要使用 JSBridge,它仍然使用 UIWebView。
我已经尝试遵循多个指南,手动将所有内容替换为 WkWebView(无论我修复多少,这都会给我带来大量错误),用新的 JSBridge 库重新导入,但我仍然会遇到许多错误,包括弃用错误。
一些错误包括:
Assigning to 'id<WKNavigationDelegate> _Nullable' from incompatible type 'ModalViewController *const __strong'
Implicit conversion from enumeration type 'WKNavigationType' (aka 'enum WKNavigationType') to different enumeration type 'UIWebViewNavigationType' (aka 'enum UIWebViewNavigationType')
No visible @interface for 'WKWebView' declares the selector 'stringByEvaluatingJavaScriptFromString:'
有没有指南告诉你如何一步一步地做到这一点?
解决方案
推荐阅读
- php - Wordpress get_tags() 不适用于 Wp-graphql 插件
- php - FluentDOM 获取查询的原始 html
- multidimensional-array - How to create 2D array in JMeter
- c++ - 序列化 filesystem::path 对象时的未定义行为
- javascript - PDF file gets cropped while exporting from Datatable
- python - Draw an empty graph using Matplotlib?
- java - 无法在 android studio v4.2 的主要活动中定义公共访问修饰符
- python - Want to identify groups of rows in dataframe given conditions and sum zero
- docker - Building golang microservice gRPC Docker image
- javascript - 看不到 axios 调用后渲染的组件内容