怎么才能在Project中找到UIWebView并替换为WKWebView呢?

How can we find UIWebView in Project and replace it with WKWebView?

我们在上传构建时从 no_reply@email.apple.com 收到了这封电子邮件:

We identified one or more issues with a recent delivery for your app, "App Name" 1.0 (5.0). Please correct the following issues, then upload again.

ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).

Best regards,

The App Store Team

我没有在我的项目中使用 UIWebView。我已经更新了所有 pods。我在工作区中搜索 'UIWebView' 一词,但没有找到任何内容。我还使用 grep -r -f "UIWebView". 在终端中搜索,得到 grep: UIWebView.: No such file or directory.

上传新版本前我应该做什么?

我解决了类似的问题如下:

  1. 在作品中搜索spaceUIWebView并替换为WKWebView

  2. 删除故事板中的 UIWebView 并添加“WKWebView”(不要忘记与代码的连接)

  3. 在终端中,在项目文件夹中,输入命令:

    grep -r "UIWebView" .

    (不要忘记 space 和命令末尾的点!)在库文件中查找 UIWebView 的链接。

  4. 使用 UIWebView 更新库,如果没有帮助,则删除所有链接到 UIWebView 的库。 (大多数带有 UIWebView 的库都有没有 UIWebView 的新更新。)

就我而言,我只是 grep -r "UIWebView" .,将 UIWebview 更改为 WKWebview,并将使用 UIWebview 的 pods 更新为我找到的较新版本。

FBSDK 5.5 版有效。