Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Analytics is not available

I did a manually install of the Firebase SDK to my iOS project. Following the instruction from README.md I included all the files from the Analytics folder:

FirebaseAnalytics.framework
FirebaseInstanceID.framework
GoogleInterchangeUtilities.framework
GoogleSymbolUtilities.framework
GoogleUtilities.framework

And I included "import FirebaseAnalytics" to my AppDelegate. and then I called:

FIRApp.configure()

But Xcode is still telling me this:

*** Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure] Firebase Analytics is not available.'

*** First throw call stack:
(
    0   CoreFoundation                      0x0000000104178d85 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000106761deb objc_exception_throw + 48
    2   CoreFoundation                      0x0000000104178cbd +[NSException raise:format:] + 205
    3   helloworld                              0x0000000103f17190 -[FIRApp configureCore] + 325
    4   helloworld                              0x0000000103f16bb1 +[FIRApp addAppToAppDictionary:] + 100
    5   helloworld                              0x0000000103f162e2 +[FIRApp configureDefaultAppWithOptions:sendingNotifications:] + 268
    6   helloworld                              0x0000000103f16027 +[FIRApp configure] + 302
    7   helloworld                              0x0000000103ee9d81 _TFC6mognet11AppDelegate11applicationfTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVs10DictionaryCSo8NSObjectPs9AnyObject____Sb + 97
    8   helloworld                              0x0000000103ee9ea4 _TToFC6mognet11AppDelegate11applicationfTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVs10DictionaryCSo8NSObjectPs9AnyObject____Sb + 180
    9   UIKit                               0x00000001051a49ac -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 272
    10  UIKit                               0x00000001051a5c0d -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3415
    11  UIKit                               0x00000001051ac568 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1769
    12  UIKit                               0x00000001051a9714 -[UIApplication workspaceDidEndTransaction:] + 188
    13  FrontBoardServices                  0x00000001091bd8c8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
    14  FrontBoardServices                  0x00000001091bd741 -[FBSSerialQueue _performNext] + 178
    15  FrontBoardServices                  0x00000001091bdaca -[FBSSerialQueue _performNextFromRunLoopSource] + 45
    16  CoreFoundation                      0x000000010409e301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    17  CoreFoundation                      0x000000010409422c __CFRunLoopDoSources0 + 556
    18  CoreFoundation                      0x00000001040936e3 __CFRunLoopRun + 867
    19  CoreFoundation                      0x00000001040930f8 CFRunLoopRunSpecific + 488
    20  UIKit                               0x00000001051a8f21 -[UIApplication _run] + 402
    21  UIKit                               0x00000001051adf09 UIApplicationMain + 171
    22  helloworld                              0x0000000103eea832 main + 114
    23  libdyld.dylib                       0x000000010722592d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

What am I doing wrong here? FYI. I am running Xcode Version 7.3.1 and I have the latest SDK.

like image 273
Giraffe Avatar asked Sep 19 '16 10:09

Giraffe


People also ask

How do I turn on Firebase Analytics?

Navigate to Tools on the top bar. After that click on Firebase. A new window will open on the right side. Inside that window click on the Analytics tab and then click on Log an Analytics event.

Is Google Firebase Analytics free?

Google Analytics for Firebase provides free, unlimited reporting on up to 500 distinct events. The SDK automatically captures certain key events and user properties, and you can define your own custom events to measure the things that uniquely matter to your business.


1 Answers

Did you add the -ObjC flag in "Other Linking Flags" setting? When I did this in my Objective-C project, the app stopped crashing when trying to load Firebase. I also included all the Firebase files, used the Firebase.h header and [FIRApp configure] to call Firebase.

I am running Xcode 8.

like image 89
Armando Avatar answered Oct 15 '22 05:10

Armando