gpt4 book ai didi

使用 Google SignIn 和 google spreadsheet api 的 iOS 示例

转载 作者:行者123 更新时间:2023-11-28 08:23:15 25 4
gpt4 key购买 nike

我一直在尝试将 google signin 与 google spreadsheet api 一起使用,这现在是必需的。有 2 个谷歌示例。

我关注了:

  1. "Google sheets iOS Quickstart"

  2. "Start Integrating Google SignIn.."

每个示例都独立运行。当我尝试将这两个 API 放在一起时,事情就分崩离析了。失败的案例太多,无法在此一一列举。大多数问题源于我对 cocoa pods 和使用 Xcode 框架的了解不足。

谁能解释一下 google signin 应该如何释放 google sheets API?

谢谢

最佳答案

我发现我必须添加延迟以允许 Google Signin 在将凭据与我的 GTLRSheetsService 对象一起使用之前进行身份验证。所以我使用 [self performSelector:@selector(Method) withObject:nil afterDelay:3.0 ]; 在调用 [[GIDSignIn sharedInstance] signIn] 后将我的代码延迟 3 秒; 然后通过 sheetsService.authorizer = [GIDSignIn sharedInstance].currentUser.authentication.fetcherAuthorizer;

传递凭据

关于使用 Google SignIn 和 google spreadsheet api 的 iOS 示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40758131/

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