gpt4 book ai didi

ios - 代码错误 : "Use of unresolved identifier: GGLContext" (without CocoaPods)

转载 作者:IT王子 更新时间:2023-10-29 05:41:15 29 4
gpt4 key购买 nike

我从事 Web 开发已有几年,这是我的第一个 iOS 应用程序项目。我已按照 Google 的 Get the Google Sign-in SDK for iOS 中的所有说明进行操作(没有 CocoaPods),我尝试模拟应用程序,但出现此错误:Use of unresolved identifier 'GGLContext'

这是从 Google 页面复制并放入 AppDelegate.swift 的代码:

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
// Initialize Google sign-in
var configureError: NSError?
GGLContext.sharedInstance().configureWithError(&configureError) // THIS LINE HAS THE ERROR
assert(configureError == nil, "Error configuring Google services: \(configureError)")

//GIDSignIn.sharedInstance().delegate = self
GIDSignIn.sharedInstance().clientID = MY_CLIENT_ID

return true
}

有什么帮助吗?

最佳答案

我遇到了和你一样的问题然后我决定阅读 Google's Tutorial再次寻找“手动”一词,他们是这样说的:

Note: If you manually installed the SDK, you should instead configure the GIDSignIn object directly, using the client ID found in the GoogleService-Info.plist file:

GIDSignIn.sharedInstance().clientID = kClientID

所以只需注释与 GGLContext 相关的行,我认为这应该可以解决这个问题。

关于ios - 代码错误 : "Use of unresolved identifier: GGLContext" (without CocoaPods),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37733373/

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