2015-10-05 34 views
2

我遵循了developers.google.com中提供的所有步驟。無法在ios 9.0中添加谷歌登錄

當我嘗試從我的plist文件做

#import <GoogleSignIn/GoogleSignIn.h> 
[GIDSignIn sharedInstance].clientID = kClientID; 

了clientID的。

但它顯示連接錯誤等預先

Undefined symbols for architecture x86_64: 
"_OBJC_CLASS_$_SFSafariViewController", referenced from: 
    objc-class-ref in GoogleSignIn(GIDSignIn.o) 
ld: symbol(s) not found for architecture x86_64 
clang: error: linker command failed with exit code 1 (use -v to see invocation) 

感謝。

+0

您使用的莢? –

+0

不,我不使用豆莢。手動配置。 – Prakash

+0

嘗試將SafariServices.framework鏈接到您的應用程序? –

回答

3

我曾經提到過上述問題。

只需要添加「SafariServices.framework」到你的項目,該項目提供的iOS 9

enter image description here

+0

現在我得到不同類型的錯誤'googlesample [6109:168567] - [__ NSDictionaryI gtm_httpArgumentsString]:無法識別選擇器發送到實例0x7fc229726250 2015-10-16 18:59:38.934 googlesample [6109:168567] ***由於未捕獲異常'NSInvalidArgumentException',原因:' - [__ NSDictionaryI gtm_httpArgumentsString]:無法識別的選擇器發送到實例0x7fc229726250' ' – Prakash

0

到目前爲止,我試過,我不能跟在谷歌標誌來完成這一點。

因此,我使用Google-Plus登錄機制來獲取用戶詳細信息。

請參閱本

https://developers.google.com/+/mobile/ios/getting-started

而且也是我現在可以共享內容和人員名單/

+0

唐'不要使用這個框架,因爲谷歌對新框架進行了許多新的更改。如果你使用這個,你的應用將被Apple拒絕,因爲一些重定向問題。 –

+0

@Prakash任何解決方案 –

1

按照谷歌文檔:https://developers.google.com/identity/sign-in/ios/sdk/,你應該做到以下幾點:

  1. 將SafariServices.framework和SystemConfiguration.framework包含到您的目標 - >構建階段 - >鏈接二進制文件與圖書館。

  2. 添加 「-ObjC」(不帶引號),你的目標 - >構建設置 - >其它鏈接器標記