这是我多年来找到我需要的每个答案后的第一个问题。
\n我在 IOS 中为 iPhone 编写了一些应用程序,我并不总是确定我在做什么,但它们可以工作!
\n他们使用 Google 登录,并且工作正常。\n现在我想为 Mac OS 编写一个应用程序,但我无法解决的问题是这一行:
\nGIDSignIn.sharedInstance.signIn(withPresenting: rootViewController) \nRun Code Online (Sandbox Code Playgroud)\n在这个函数中:
\nfunc handleSignInButton() {\n\xc2\xa0 GIDSignIn.sharedInstance.signIn(\n\xc2\xa0 \xc2\xa0 withPresenting: rootViewController) { signInResult, error in\n\xc2\xa0 \xc2\xa0 \xc2\xa0 guard let result = signInResult else {\n\xc2\xa0 \xc2\xa0 \xc2\xa0 \xc2\xa0 // Inspect error\n\xc2\xa0 \xc2\xa0 \xc2\xa0 \xc2\xa0 return\n\xc2\xa0 \xc2\xa0 \xc2\xa0 }\n\xc2\xa0 \xc2\xa0 \xc2\xa0 // If sign in succeeded, display the app\'s main content View.\n\xc2\xa0 \xc2\xa0 }\n\xc2\xa0 )\n}\nRun Code Online (Sandbox Code Playgroud)\n在 Google 登录教程中:\n https://developers.google.com/identity/sign-in/ios/sign-in
\n我可以用什么来替换 Mac OS 应用程序中的 …