问题标签 [gidsignin]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
swift - 如何在 Swift iOS 中重新启动应用程序后使用 GIDSignIn 获取 gmail 登录的用户详细信息
我已经在 iOS swift 项目中集成了 GIDSignIn。我能够登录并获取用户详细信息,例如使用电子邮件。
但是当我杀死并重新启动应用程序时GIDSignIn.sharedInstance()?.currentUser
变为零。我需要在应用程序中静默登录以获取currentUser
详细信息。当应用程序重新启动而没有静默登录时,有什么方法可以获取登录用户的电子邮件地址?
ios - 在 iOS 中谷歌登录后无法获取 Authcode (swift)
问题:
在 iOS 应用程序中,我使用 google signIn 来促进获取 authCode 的过程,稍后将其发送到服务器并在 google 日历 API 中交换 refresh_token。坏消息是它user.serverAuthCode
总是为零。
现在发生了什么: 我已经按照谷歌的文档来实现它。此时,当我单击 google 登录按钮时,我会转到一个页面,在该页面中填写我的凭据并同意所有范围。然后它将我重定向回 iOS 应用程序,但我没有得到 authCode。
代码:
我还在目标信息中添加了 URL 类型,如谷歌文档中所述
最后,我有一个 viewController 用于GIDSignInButton
启动登录过程。
有什么我想念的吗?我看了一下这篇文章,但我无法解决问题。感谢您的时间!
ios - 'GIDSignIn' 没有可见的@interface 声明选择器'handleURL:
我在目标 C 中实现了 Google SignIn 的委托方法。但出现以下错误Error - No visible @interface for 'GIDSignIn'
ios - “GIDSignIn”类型的值没有成员“signInSilently”
这是什么错误,请指导到目前为止在谷歌上找不到任何材料。下面是我的代码,它给出了错误:
两个错误来了:
xcode - ios中的Google登录sdk给出链接器错误
我正在尝试将 Google 登录合并到我的应用中。
我已经下载了 Signin SDK 和其中的示例应用程序构建并正常工作。
我试图让 SDK 工作,它现在完全按照示例应用程序进行设置。
但是我收到以下错误:
架构 arm64 的未定义符号:“_OBJC_CLASS_$_GSDK_GTMSessionFetcher”,引用自:GoogleSignIn 中的 objc-class-ref(GIDSignIn.o) GoogleSignIn(GIDRuntimeConfigFetcher.o) 中的 objc-class-ref “_OBJC_CLASS_$_GSDK_GTMOAuth2Keychain”,引用自:objc- GoogleSignIn(GIDSignIn.o) 中的类引用“_OBJC_CLASS_$_GSDK_GTMOAuth2SignIn”,引用自:GoogleSignIn(GIDAuthentication.o) 中的 objc-class-ref GoogleSignIn(GIDSignIn.o) 中的 objc-class-ref“_OBJC_CLASS_$_GSDK_OpenInChromeController”,引用来自:GoogleSignIn 中的objc-class-ref(GIDSignIn.o) "_OBJC_CLASS_$_GSDK_GTMOAuth2ViewControllerTouch",引用自:GoogleSignIn(GIDSignIn.o) 中的objc-class-ref,"_OBJC_CLASS_$_GSDK_GTMSessionFetcherService",引用自:objc-class-ref in GoogleSignIn(GIDSignIn.o) "_GSDK_NSClassFromString",引用自:l011 in GoogleSignIn(GIDSignIn.o) l059 in GoogleSignIn(GIDSignIn.o) "_OBJC_CLASS_$_GSDK_GTMOAuth2Authentication",引用自:objc-class-ref in GoogleSignIn(GIDAuthentication.o) objc-class-ref in GoogleSignIn(GIDSignIn.o) ld:未找到架构 arm64 clang 的符号:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)未找到架构 arm64 clang 的符号:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)未找到架构 arm64 clang 的符号:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
因此,我从示例应用程序中删除了 GoogleSignInDependencies.framework 以查看差异,我收到以下错误:
Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_GTMOAuth2KeychainCompatibility", referenced from: objc-class-ref in GoogleSignIn(GIDAuthStateMigration_bdf842e92d17b12b5f020e0e721bd017.o) "_OBJC_CLASS_$_OIDURLQueryComponent", referenced from: objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o) "_OBJC_CLASS_ $_OIDServiceConfiguration", referenced from: objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o) "_OIDResponseTypeCode", referenced from: -[GIDSignIn authenticateInteractivelyWithOptions:] in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o) "_OBJC_CLASS_$_OIDAuthorizationService", referenced from: objc- GoogleSignIn 中的类引用(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o) objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o) "_OBJC_CLASS_$_GTMSessionFetcher", referenced from: objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o) "_OBJC_CLASS_$_OIDAuthorizationRequest", referenced from: objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o) "_OBJC_CLASS_$_GTMAppAuthFetcherAuthorization", referenced from: _OBJC_CLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o) objc-class-ref in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o) objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o) objc-class-ref in GoogleSignIn(GIDAuthStateMigration_bdf842e92d17b12b5f020e0e721bd017.o) (maybe you meant: _OBJC_CLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport, _OBJC_CLASS_$_GTMAppAuthFetcherAuthorizationEMMChainedDelegate ) "_OIDOAuthTokenErrorDomain", referenced from: ___46-[GIDAuthentication refreshTokensWithHandler:]_block_invoke in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o) " _OBJC_CLASS_$_OIDIDToken", referenced from: objc-class-ref in GoogleSignIn(GIDGoogleUser_2bdd4a676c033bc6ca21970e75d9159c.o) objc-class-ref in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o) objc-class-ref in GoogleSignIn(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o) "_OBJC_METACLASS_$_GTMAppAuthFetcherAuthorization",参考自:_OBJC_METACLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o) (maybe you meant: _OBJC_METACLASS_$_GTMAppAuthFetcherAuthorizationEMMChainedDelegate, _OBJC_METACLASS_$_GTMAppAuthFetcherAuthorizationWithEMMSupport ) "_OIDOAuthErrorResponseErrorKey", referenced from: +[GIDAuthentication handleTokenFetchEMMError:completion:] in GoogleSignIn(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o) "_OBJC_CLASS_$_GTMKeychain" ,引用自:GoogleSignIn 中的 objc-class-ref(GIDAuthStateMigration_bdf842e92d17b12b5f020e0e721bd017.o) "_OBJC_CLASS_$_OIDAuthState",引用自:GoogleSignIn 中的objc-class-ref(GIDAuthentication_7b83cc27af8929ec7e4c9760d73a0f31.o) GoogleSignIn 中的 objc-class-ref(GIDSignIn_f05654be6d1b2af59ab6df426a0c4eb9.o) ld:未找到架构 x86_64 的符号:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)
不同之处似乎是我的应用程序使用了不同的符号,即带有 GSDK 的符号。有人可以告诉我它们是什么以及我如何控制这种差异吗?
非常感谢保罗
ios - GIDSignIn 在提示之前指定范围
我在 iOS 上升级到 GoogleSignIn 6.0,但在登录时找不到指定登录范围的方法。我只能看到一个名为 addScopes() 的 API,我可以在基本登录后指定范围。但这会导致两个单独的 signIn 提示,这很奇怪。早些时候,我们可以像这样简单地为 signIn 指定范围:
我想知道是否有新的 GoogleSignIn 6.0 的示例代码?即使是谷歌提供的示例代码也有两步登录,首先是一般登录,然后是添加范围登录。
api - 如何将 GIDSignIn.signIn() 和 GIDSignIn.addScopes() 合并为用户的一步
我正在制作一个使用 SwiftUI 从 iOS 上的 Gmail API 请求数据的应用程序。我想知道是否有办法将上述两个步骤组合成开放。目前,iOS 要求用户打开一个签名窗口,用户登录,然后 iOS 要求用户登录并再次提醒。这不是好的 UI,我希望,虽然我是初学者,但我可以做得更好!
ios - 在 iOS 应用程序崩溃中为 GIDSignIn 设置 clientID
我尝试在我的 iOS 应用程序(ObjC)中使用 GIDSignIn。但是当我这样做时
在我的 app-delegate 中,我得到了 error unrecognized selector sent to instance
。
我正在使用 cocoapods 加载框架
如文档中所述,我在 info.plist 中配置了 URL 方案。
我正在为 iOS 14 构建应用程序。
正如网络上无数帖子中所建议的那样,我加载了libz.tbd
, SystemConfiguration.framework
, StoreKit.framework
,AddressBook.framework
并-ObjC
在我的其他链接器标志中进行了设置。
唉,我仍然收到这个错误。
有任何想法吗?