2015-09-07 7 views
13

का उपयोग करने में गायन करते समय URL योजना कॉम-google-gidconsent" त्रुटि के लिए कोई पंजीकृत हैंडलर नहीं है मैंने मैन्युअल रूप से Google साइन इन एसडीके (कोकोपोड्स के साथ नहीं) एकीकृत किया है और यह ठीक बनाता है, लेकिन जब मैं प्रोजेक्ट चलाता हूं I साइन इन करने के बाद हमेशा इन त्रुटियों को प्राप्त करें:"GIDSignIn

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 

इस प्रकार मैं एसडीके का उपयोग कर रहा हूं।

सबसे पहले मैं 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() 
} 

क्या मुद्दा हो सकता है? मैं एसडीके संस्करण 2.2.0

उत्तर

29

का उपयोग कर रहा हूं आपके कार्यान्वयन में कोई समस्या नहीं है। उन सभी चेतावनियों का अर्थ उन ऐप्स हैं जिन्हें प्रत्येक यूआरएल योजना का संदर्भ दिया गया है जो डिवाइस पर स्थापित नहीं हैं।

यदि आप सिम्युलेटर पर परीक्षण कर रहे हैं, तो आपको हर समय उन त्रुटियां मिलेंगी। लेकिन, यदि आप किसी डिवाइस पर परीक्षण करते हैं, तो आप सत्यापित कर सकते हैं कि यदि आपके पास संबंधित ऐप्स इंस्टॉल हैं तो त्रुटियां समाप्त हो जाएंगी।

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