O'Reilly logo

Firebase Cookbook by Houssem Yahiaoui

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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() ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required