iosgoogle-analyticstwitter-fabricfabric.iogoogle-fabric

Fabric not working if not initialised in didFinishLaunchingWithOptions method


We have integrated Fabric in our application. We observed that dashboard is not updating if we initialise fabric object other than didFinishLaunch.. I should not initialise in didFinishLaunchingWithOptions because before initialising I have to show OptIn page for the user. So nn his acceptance only I should initiate the Fabric.. Can you help me in this?

Following is the code I added for initialising.

[[Fabric sharedSDK] setDebug:YES];
[Fabric with:@[CrashlyticsKit]];

Solution

  • I have contacted Fabric support, it seems their logic is completely based on app life cycle and it work properly if we initialise the Faric object other than didFinishLauch method..

    So we ended up changing the logic in my app.. We are initialising Fabric for first time even if user not yet accepted in OptIn page, but not logging any custom events if he not opted-in. And then from the second launch it works as per his decision on OptIn page.

    Thanks all for responding.