My app use google+ signin and in my appdelegate.swift i have:
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSOb
In Swift 3, need to do in this way:
Override and implement the next method:
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any]) -> Bool {
let sourceApplication = options[UIApplicationOpenURLOptionsKey.sourceApplication] as? String
let annotation = options[UIApplicationOpenURLOptionsKey.annotation]
let googleHandler = GIDSignIn.sharedInstance().handle(
url,
sourceApplication: sourceApplication,
annotation: annotation )
let facebookHandler = FBSDKApplicationDelegate.sharedInstance().application (
app,
open: url,
sourceApplication: sourceApplication,
annotation: annotation )
return googleHandler || facebookHandler
}
Then:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
PFFacebookUtils.initializeFacebook(applicationLaunchOptions: launchOptions)
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
var configureError: NSError?
GGLContext.sharedInstance().configureWithError(&configureError)
assert(configureError == nil, "Error configuring Google services: \(String(describing: configureError))")
return true
}