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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.