Ich habe einige der ähnlichen Fragen hier gelesen, leider hat mir nicht wirklich viel geholfen.Facebook und Google Login - Konflikt (Xcode)
Ich habe ein Xcode-Projekt mit Swift, derzeit habe ich Twitter & Facebook Login integriert. Ich möchte auch Google Login haben. Ich habe die Schritte so weit gefolgt, aber ich habe 2 Fragen erreichen:
didFinishLaunchingWithOptions
(in AppDelegate.swift). Ich habe bereits Facebook als Rückgabetyp, aber in der Google-Dokumentation heißt es, dass esreturn true
erfordert. Wie geht das? Hier ist der Code:func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Google Login var configureError: NSError? GGLContext.sharedInstance().configureWithError(&configureError) assert(configureError == nil, "Error configuring Google services: \(configureError)") //return true -> Expected by Google return FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions) }
2) openURL
func - Dieses auch Google Zusammenhang mit der Rückkehr erwartet, aber es zur Zeit gibt Facebook (basierend auf deren Dokumentation):
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool {
return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation)
// Required By Google?!
return GIDSignIn.sharedInstance().handleURL(url, sourceApplication: sourceApplication, annotation: annotation)
}
Also, ich brauche so Hilfe beim Umgang mit diesen. Vielen Dank im Voraus!
Danke, es hat funktioniert. Würdest du bitte den Zweck von b = FBSDK ... erklären? –