How to do it...

In your AppDelegate file, add the following imports: 

      import Firebase      import FBSDKCoreKit

Next, underneath your didFinishLaunchingWithOptions, add the following lines: 

       FirebaseApp.configure()       FBSDKApplicationDelegate.sharedInstance().       application(application,           didFinishLaunchingWithOptions: launchOptions)

The first line will initialize the usage of Firebase within our application and will make sure that we're exploiting the Facebook capabilities and also initiating it with the startup of our application.

Next, within the same file add the following:

     func application(_ app: UIApplication, open url: URL,        options: [UIApplicationOpenURLOptionsKey : Any] =           [:]) -> Bool {       let handled =       FBSDKApplicationDelegate.sharedInstance() ...

Get Firebase Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.