2015-09-07 11 views
13

Googleのサインをcdoc(cocoapodsではなく)に手動で統合しています。ログイン後にこのエラーが発生する場合があります。GIDSignInを使用しているときに「URLスキームcom-google-gidconsentのハンドラが登録されていません」というエラーが発生しました

2015-09-07 15:44:14.071 Contacts++[82438:4826277] LaunchServices: ERROR: There is no registered handler for URL scheme com-google-gidconsent-google 
2015-09-07 15:44:14.071 Contacts++[82438:4826277] LaunchServices: ERROR: There is no registered handler for URL scheme com-google-gidconsent-youtube 
2015-09-07 15:44:14.072 Contacts++[82438:4826277] LaunchServices: ERROR: There is no registered handler for URL scheme com-google-gidconsent 
2015-09-07 15:44:14.072 Contacts++[82438:4826277] LaunchServices: ERROR: There is no registered handler for URL scheme com.google.gppconsent.2.4.1 
2015-09-07 15:44:14.072 Contacts++[82438:4826277] LaunchServices: ERROR: There is no registered handler for URL scheme com.google.gppconsent.2.4.0 

これは私がsdkを使用する方法です。

まず、私はhttps://developers.google.com/identity/sign-in/ios/sign-in?ver=swiftのすべての手順に従います。

コード:
AppDelegate.swift

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 
    // google 
    // Initialize sign in 
    GIDSignIn.sharedInstance().clientID = "<client id>" 
    GIDSignIn.sharedInstance().delegate = self 

    return true 
} 

func signIn(signIn: GIDSignIn!, didSignInForUser user: GIDGoogleUser!, withError error: NSError!) { 

    if error == nil { 
     let userID = user.userID 
     let idToken = user.authentication.idToken 
     let name = user.profile.name 
     let email = user.profile.email 

     print(userID, idToken, name, email) 
    } else { 
     print(error.localizedDescription) 
    } 
} 

func signIn(signIn: GIDSignIn!, didDisconnectWithUser user: GIDGoogleUser!, withError error: NSError!) { 

} 

ViewController.swift

override func viewDidLoad() { 
     super.viewDidLoad() 

     // google plus 
     //GIDSignIn.sharedInstance().clientID = clientID 
     GIDSignIn.sharedInstance().uiDelegate = self 
     GIDSignIn.sharedInstance().signIn() 
} 

問題となることがありますか? SDKバージョン2.2.0を使用しています

答えて

29

実装に問題はありません。これらの警告は、各URLスキームが参照するアプリがデバイスにインストールされていないことを意味します。

シミュレータでテストしている場合、これらのエラーは常に発生します。しかし、デバイスでテストすると、対応するアプリがインストールされているとエラーがなくなることを確認できます。

2015-09-07 15:44:14.071 Contacts++[82438:4826277] LaunchServices: ERROR: There is no registered handler for URL scheme com-google-gidconsent-youtube 
-1
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ 
     [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://www.facebook.com"]]; 
     exit(0); 
}) 
+2

マインドを説明する:あなたのデバイス上のYouTubeのアプリを持っている場合

はたとえば、あなたが行を見ていないのだろうか? – CinCout

+0

これがどのように質問に答えるかを詳しく教えてください。 – JAL

関連する問題