gpt4 book ai didi

ios - 更新 pod 后面临额外参数错误

转载 作者:行者123 更新时间:2023-12-02 02:08:18 24 4
gpt4 key购买 nike

我的下面的代码在更新 pod 之前运行得很好。

 func application(_ application: UIApplication, open url: URL, sourceApplication: String?, annotation: Any) -> Bool {

let googleDidHandle = GIDSignIn.sharedInstance().handle(url, sourceApplication: sourceApplication, annotation: annotation)

let facebookDidHandle = ApplicationDelegate.shared.application( application, open: url, sourceApplication: sourceApplication, annotation: annotation)

return googleDidHandle || facebookDidHandle
}

但是今天我更新了 pod,但出现了以下错误

Extra argument 'sourceApplication' in call

在 AppDelegate 方法中的 open URL 方法中

GIDSignIn.sharedInstance().uiDelegate = self

我在上面的行遇到了以下错误

Value of type 'GIDSignIn?' has no member 'uiDelegate'

extension LoginViewController: GIDSignInDelegate, GIDSignInUIDelegate {

}

我在上面的行遇到了以下错误

Use of undeclared type 'GIDSignInUIDelegate'

编辑

将 GoogSignIn 指定版本设置为 4.4.0 后,上述错误消失,但我在重新验证 Firebase 用户身份时遇到错误。

错误

Variable 'credential' used before being initialized

这是我的另一个问题链接:Firebase User re-authentication initialising error

我该如何解决这个问题?

最佳答案

将 GoogleSignIn Pod 4.4.0 更新到 5.0.1 后,需要更新 GoogleSignIn 集成代码。

在 4.4.0 中 - 在 AppDelegate 中的 open URL 方法中

替换下面的代码,

GIDSignIn.sharedInstance().handle(url, sourceApplication: sourceApplication, annotation: annotation)

GIDSignIn.sharedInstance().handle(url)

替换下面的代码,

GIDSignIn.sharedInstance().uiDelegate = self

GIDSignIn.sharedInstance()?.presentingViewController = self

当前更新中删除了 GIDSignInUIDelegate 协议(protocol)。

关于ios - 更新 pod 后面临额外参数错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57692315/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com