ITMS-90809:已弃用 API 用法——当上传 myApp 时,Apple 将停止接受使用 UIWebView APIs 的应用提交

ITMS-90809: Deprecated API Usage — Apple will stop accepting submissions of apps that use UIWebView APIs When upload myApp

我尝试将应用程序上传到 App Store,但出现问题。我收到一封电子邮件,告诉我不要使用 UIWebView,但被拒绝了。

App Store Connect Dear Developer,

We identified one or more issues with a recent delivery for your app, "gamemain" 1.0.0 (1). Your delivery was successful, but you may wish to correct the following issues in your next delivery:

ITMS-90809: Deprecated API Usage - Apple will stop accepting submissions of apps that use UIWebView APIs . See https://developer.apple.com/documentation/uikit/uiwebview for more information.

After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to App Store Connect.

Best regards,

The App Store Team

但是我不使用UIWebView,我只使用WKWebView。所以我进行了全面搜索,看看图书馆是否在使用它。但没有搜查任何东西。有什么问题吗?

shift + command + F

的搜索结果

Web 视图使用情况类

import Foundation
import UIKit
import WebKit
import Toaster
import StoreKit
import MobileCoreServices
import Alamofire

class kWebViewController: UIViewController, WKUIDelegate, WKScriptMessageHandler, UIImagePickerControllerDelegate, UINavigationControllerDelegate,  NASWallDelegate, SKProductsRequestDelegate {

 @IBOutlet weak var indicator: UIImageView!
    @IBOutlet var kWebView: WKWebView!

播客文件

# Uncomment the next line to define a global platform for your project
platform :ios, '12.0'

target 'gamemain' do
    # Comment the next line if you don't want to use dynamic frameworks
     use_frameworks!

    # Pods for DeleteMe
    pod 'SwiftSVG', '~> 2.0'
    pod 'Toaster'
    pod 'BigInt', '~> 4.0'
    pod 'CryptoSwift'
    pod 'RealmSwift'
    pod 'web3.swift.pod', '~> 2.2.0'
    pod 'Firebase'
    pod 'Firebase/Messaging'
    pod 'Firebase/Auth'
    pod 'Firebase/Core'
    pod 'Alamofire', '~> 4.8.2'
end

我相信你会解决这个问题。

Apple 最近引入了一个新的 App 提交警告 ITMS - 90809 声明我们正式弃用 UIWebView。如果您的应用程序代码或任何框架仍然包含 UIWebView 的引用,您肯定会收到警告。

WKWebViewUIWebView 的替代品,我相信很快 Apple 将开始拒绝仍在使用 UIWebView 的应用程序。所以为此做好准备。

通过执行以下终端命令,您可以轻松了解哪个库仍在使用 UIWebView 参考(不要错过 .(点))。

$ grep -r "UIWebView" .

框架匹配的输出

./<ANY>.framework/Headers/ANY.h:#define ANYUseUIWebView ANY_NAME_PASTE(ANY_PREFIX_NAME, ANYUseUIWebView)

库匹配的输出

Binary file ./<FRAMEWORK-NAME>.framework/<LIB-FILE>.a matches

如果您看到一些匹配项,则表示是时候升级这些库了。

希望对您有所帮助。干杯

编辑

来自 Apple 的更新

The App Store will no longer accept new apps using UIWebView as of 
April 2020 and app updates using UIWebView as of December 2020.

参考:https://developer.apple.com/news/?id=12232019b

在 mac 中,这个命令对我有用

sudo grep -wil -r “uiwebview” .

您可以转到您的项目文件夹并运行上述命令。 它会列出所有使用 UIWebview

的文件

我按照以下步骤找到了问题

  • Xcode 打开 ios 项目并搜索 UIWebView.
  • 在结果中显示了哪个依赖正在使用UIWebView
  • 然后尝试更新您的依赖项。
  • 确保新的依赖项没有在第 1 步之后使用 UIWebView

就我而言,这个库使用 UIWebView flutter_facebook_login: ^2.0.1 并替换 flutter_facebook_auth: ^0.2.3

希望对您有所帮助!

我执行了 grep -r "uiwebview" . 命令,它显示了许多文件,如附图所示。

对于 pods 最后我知道我应该更新它们但是我项目中的文件呢但是我确定我的项目中根本没有 uiwebview