Google Sign-In crashes on iOS 9 attempting to call canOpenURL

后端 未结 7 2417
感动是毒
感动是毒 2020-11-27 17:05

While testing Google Sign-In 2.1.0 on the iOS 9 SDK, invoking GIDSignIn.sharedInstance().signInSilently() ends up crashing on an internal Google Sign-In SDK cal

7条回答
  •  猫巷女王i
    2020-11-27 17:38

    Just follow the steps in: https://developers.google.com/identity/sign-in/ios/start-integrating#add_url_schemes_to_your_project (including adding the schemes) and it should be working fine.

    And, as requested by comments below, I'll emphasise that the problem probably occurred by not adding the URL schemes as described in the link above.

    Quoting from the link above:

    Google Sign-in requires two custom URL Schemes to be added to your project.

    To add the custom schemes:

    1. Open your project configuration: double-click the project name in the 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.
    3. Click the + button, and add a second URL scheme. This one is the same as your app's bundle ID. For example, if your bundle ID is com.example.app, type that value into the URL Schemes box. You can find your app's bundle ID in the General tab of the project configuration (Identity > Bundle Identifier).

提交回复
热议问题