简体   繁体   English

Google登录404错误并迅速

[英]Google Sign-In 404 Error with swift

link: Simulator Screenshot of Error 链接: 模拟器错误的屏幕截图

Hello, I just had my laptop repaired/reset after some water damage and now when opening the app on Xcode 9 Beta and pressing the "Google Sign-in" button the link fails to sign in. This used to work perfectly before 3 weeks ago on Xcode 8 before the water spill incident so I'm not sure what's going wrong. 您好,我只是在水损坏后维修/重置了笔记本电脑,现在在Xcode 9 Beta上打开应用程序并按“ Google登录”按钮时,链接无法登录。这在3周前可以正常使用在发生漏水事件之前在Xcode 8上运行,因此我不确定出了什么问题。

I tried submitting the failed link myself and that's where I got the 404 HTTP Request error. 我尝试自己提交失败的链接,这就是我收到404 HTTP Request错误的地方。

I also checked to make sure that GoogleService-info.plist matched with what's on firebase and I made sure I reregistered the signing of this app to my appleid. 我还进行了检查,以确保GoogleService-info.plist与firebase上的内容匹配,并且确保将该应用的签名重新注册到我的小程序。

Any help would be appreciated. 任何帮助,将不胜感激。 Thanks in advance. 提前致谢。

I had the same issue please check following things: - 我遇到了同样的问题,请检查以下内容:-

check console.developers.google.com/apis/credentials for your project and see whether there is already a client_id in OAuth 2.0 client IDs section , if so then copy that client id and replace it with you GoogleService-Info.plist file's CLIENT_ID and accordingly change REVERSED_CLIENT_ID (in reverse manner) now clean and build your app and test it will work 检查项目的console.developers.google.com/apis/credentials,并在OAuth 2.0客户端ID部分中查看是否已经有一个client_id,如果是,则复制该客户端ID并用您的GoogleService-Info.plist文件的CLIENT_ID替换,相应地更改REVERSED_CLIENT_ID(以相反的方式),现在清理并构建您的应用并测试它是否可以运行

It seems that you might have not add a URL scheme to your project 看来您可能没有在项目中添加URL方案

If you do not add a URL scheme into your, Follow some step to add 如果您没有在其中添加URL方案,请按照以下步骤添加

  1. Open your project configuration: double-click the project name in he left tree view. 打开项目配置:在左树视图中双击项目名称。 Select your app from the TARGETS section, then select the Info tab, and expand the URL Types section. 从“ 目标”部分中选择您的应用,然后选择“ 信息”选项卡,然后展开“ URL类型”部分。

  2. Click the + button, and add a URL scheme for your reversed client ID. 单击+按钮,然后为您的反向客户端ID添加URL方案。 To find this value, open the GoogleService-Info.plist configuration file, and look for the REVERSED_CLIENT_ID key. 要找到此值,请打开GoogleService-Info.plist配置文件,然后查找REVERSED_CLIENT_ID密钥。 Copy the value of that key, and paste it into the URL Schemes box on the configuration page. 复制该键的值,然后将其粘贴到配置页上的“ URL方案”框中。 Leave the other fields blank. 将其他字段留空。

在此处输入图片说明

Note: Don't foget to check your client_id 注意:请不要检查您的client_id

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM