Aryan Kashyap Aryan Kashyap - 16 days ago 29
Swift Question

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

Answer

I am using Xcode 7.3.1 targeting iOS 9.3 on OS X 10.11.5.

I had the exact same issue as above with the "Undefined symbols" issue.

I first emptied everything from the "Other Linker Flags" and then added $(OTHER_LDFLAGS) and -ObjC as 2 separate items (using the + button when you double click).

The other thing I did was remove the frameworks giving me issues - GoogleUtilities and FirebaseAnalytics.

I then added them back in using the "Add files to Project" option one at a time and ensured they are targeted to my iOS app.

The build was successful after that and ads show up.