iOS Swift使用Google Plus登录

问题描述:

在iOS 9 SDK上测试google-plus-ios-sdk-1.7.1时,调用GPPSignIn.sharedInstance()最终会在内部Google Sign-In SDK调用canOpenURL时崩溃iOS Swift使用Google Plus登录

2016-09-22 14:12:56.135 MCN[305:49025] -canOpenURL: failed for URL: "com.google.gppconsent.2.4.1://" - error: "This app is not allowed to query for scheme com.google.gppconsent.2.4.1" 
2016-09-22 14:12:56.137 MCN[305:49025] -canOpenURL: failed for URL: "com.google.gppconsent.2.4.0://" - error: "This app is not allowed to query for scheme com.google.gppconsent.2.4.0" 
2016-09-22 14:12:56.139 MCN[305:49025] -canOpenURL: failed for URL: "com.google.gppconsent.2.3.0://" - error: "This app is not allowed to query for scheme com.google.gppconsent.2.3.0" 
2016-09-22 14:12:56.140 MCN[305:49025] -canOpenURL: failed for URL: "com.google.gppconsent.2.2.0://" - error: "This app is not allowed to query for scheme com.google.gppconsent.2.2.0" 
2016-09-22 14:12:56.141 MCN[305:49025] -canOpenURL: failed for URL: "com.google.gppconsent://" - error: "This app is not allowed to query for scheme com.google.gppconsent" 
2016-09-22 14:12:56.143 MCN[305:49025] -canOpenURL: failed for URL: "hasgplus4://" - error: "This app is not allowed to query for scheme hasgplus4" 

添加此计划

<key>LSApplicationQueriesSchemes</key> 
<array> 
    <string>com.example.foo</string> 
    <string>com.googleusercontent.apps.1234567890-abcdefghijklmnopqrstuvwxyz</string> 
    <string>com-google-gidconsent-google</string> 
    <string>com-google-gidconsent-youtube</string> 
    <string>com-google-gidconsent</string> 
    <string>com.google.gppconsent.2.4.1</string> 
    <string>com.google.gppconsent.2.4.0</string> 
    <string>googlechrome</string> 
    <string>googlechrome-x-callback</string> 
</array> 

让其他轰然

2016-09-22 14:20:01.169 MCN[309:50443] -canOpenURL: failed for URL: "com.google.gppconsent.2.4.1://" - error: "(null)" 
2016-09-22 14:20:01.171 MCN[309:50443] -canOpenURL: failed for URL: "com.google.gppconsent.2.4.0://" - error: "(null)" 
2016-09-22 14:20:01.173 MCN[309:50443] -canOpenURL: failed for URL: "com.google.gppconsent.2.3.0://" - error: "This app is not allowed to query for scheme com.google.gppconsent.2.3.0" 
2016-09-22 14:20:01.175 MCN[309:50443] -canOpenURL: failed for URL: "com.google.gppconsent.2.2.0://" - error: "This app is not allowed to query for scheme com.google.gppconsent.2.2.0" 
2016-09-22 14:20:01.177 MCN[309:50443] -canOpenURL: failed for URL: "com.google.gppconsent://" - error: "This app is not allowed to query for scheme com.google.gppconsent" 

我下面将可能WO认为rk给你。

<key>LSApplicationQueriesSchemes</key> 
    <array> 
     <string>com-google-gidconsent-google</string> 
     <string>com-google-gidconsent-youtube</string> 
     <string>com-google-gidconsent</string> 
     <string>com.google.gppconsent.2.4.1</string> 
     <string>com.google.gppconsent.2.4.0</string> 
     <string>googlechrome</string> 
     <string>googlechrome-x-callback</string> 
     <string>hasgplus4</string> 
     <string>com.google.gppconsent.2.3.0</string> 
     <string>com.google.gppconsent.2.2.0</string> 
     <string>com.google.gppconsent</string> 
    </array> 
+0

但我用 返回此异常 canOpenURL:失败的URL: “com.google.gppconsent.2.4.1://” - 错误: “(空)” 2016年9月22日15 :08:26.937 MCN [3954:1314690] -canOpenURL:网址失败:“com.google.gppconsent.2.4.0://” - 错误:“(null)” 2016-09-22 15:08:26.941 MCN [3954:1314690] -canOpenURL:URL失败:“com.google.gppconsent.2.3.0://” - 错误:“(null)” –