Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Crash.. iOS Swift

My Firebase iOS App i had to put the frameworks in manually due to some reason in cocoapods.

i have been getting an crash error saying

2016-06-04 00:48:51.356 NewFirebase[74218:11918327] Configuring the default app.
2016-06-04 00:48:51.401 NewFirebase[74218:11918425] +[NSData gtm_dataByGzippingData:]: unrecognized selector sent to class 0x10bdd8110
2016-06-04 00:48:51.403 NewFirebase[74218:] <FIRAnalytics/INFO> Firebase Analytics v.3200000 started
2016-06-04 00:48:51.404 NewFirebase[74218:11918425] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSData gtm_dataByGzipping

The only line i have put related to firebase is

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        // Override point for customization after application launch.

        FIRApp.configure()


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

        return true
    }

other is related to facebook login i am gonna put with firebase

These are the frameworks in it Frameworks

This is what the linker section looks like in the build settings Linker Flags Section

Please feel free if you want any more code

if i get rid of FIRApp.configure() Everything works fine as its supposed to be ..

like image 425
Aryan Kashyap Avatar asked Jun 03 '16 23:06

Aryan Kashyap


2 Answers

You need to add these libraries

  • libc++.tbd
  • libsqlite3.tbd
  • AddressBook.framework

to Link Binary With Libraries.

Go to Targets -> Build Phases

like image 98
Dima Mi Avatar answered Oct 22 '22 00:10

Dima Mi


add two parameter in Other Linker Flags

$(inherited)
-ObjC

enter image description here

like image 22
Pratik Avatar answered Oct 22 '22 01:10

Pratik