简体   繁体   中英

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.

I tried submitting the failed link myself and that's where I got the 404 HTTP Request error.

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.

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

It seems that you might have not add a URL scheme to your project

If you do not add a URL scheme into your, Follow some step to add

  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.

  2. Click the + button, and add a URL scheme for your reversed client ID. To find this value, open the GoogleService-Info.plist configuration file, and look for the REVERSED_CLIENT_ID key. Copy the value of that key, and paste it into the URL Schemes box on the configuration page. Leave the other fields blank.

在此处输入图片说明

Note: Don't foget to check your client_id

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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