Reputation: 5628
UPDATE: I have fixed the issue somehow, I am not sure how. I just deleted the Apps from my dashboard, recreated them, cleaned the Fabrics and Crashlytics Cache and after four or five times trying, it started working out of its own accord. I am still interested in knowing how did it happen and how can it actually be solved without deleting the app altogether.
TL;DR I am not receiving any stats from Answers kit and it looks like Fabric thinks Answers is not installed in my App even though it is. I am not interested in events tracking, I just need the metrics stats.
Fabric Crashlytics kit comes bundled together with Answers and for most of my Apps, whenever I set up Crashlytics, Answers is set up too and I can see stats on my Fabric Dashboard.
However for a couple of my apps, I can't see the stats and it seems like Answers is disabled. The Dashboard says for viewing stats, Answers is required.
But when I look at my Fabric Mac Client, It says that for this App, Answers kit is installed and enabled.
So let's head back to the web dashboard for the App, all the options for stats are disabled except Crashlytics and the App itself is kind of greyed out unlike other Apps.
And in details it first keeps waiting for "Events" and recommends that I should make a fresh installation of the App (Which I have done a number of times now).
After a while, it says no events were received and it asks me to perform a fresh install and enable debugging mode.
My pod file is:
pod 'Fabric'
pod 'Crashlytics'
I am setting up my Fabric kit in AppDelegate like:
[Fabric with:@[[Crashlytics class]]];
And I have enabled the debugging mod like:
[[Fabric sharedSDK] setDebug: YES];
I have even logged a login event even though I don't need it, just to see if it starts transmitting Answers data.
[Answers logLoginWithMethod:@"Email"
success:@YES
customAttributes:@{}];
There is also this interesting log when App runs:
[FileManager] Failed to remove file '/var/mobile/Containers/Data/Application/F055EE71-5064-4105-B41D-BD098F28DAA9/Library/Caches/com.crashlytics.data/com.sampleapp.mysampleapp/v3/launchmarker' : Error Domain=NSCocoaErrorDomain Code=4 "“launchmarker” couldn’t be removed." UserInfo={NSUnderlyingError=0x14e6a830 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}, NSFilePath=/var/mobile/Containers/Data/Application/F055EE71-5064-4105-B41D-BD098F28DAA9/Library/Caches/com.crashlytics.data/com.sampleapp.mysampleapp/v3/launchmarker, NSUserStringVariant=(
Remove
)}
It pops up whenever I attempt a fresh install after resetting the simulator. Also, check the settings json in Fabrics Data in Cache. The curious bits here:
"features": {
"collect_logged_exceptions": true,
"collect_reports": false,
"collect_analytics": false,
"prompt_enabled": false,
"push_enabled": true
}
Complete JSON can be seen here.
How can I fix this?
Upvotes: 4
Views: 4464
Reputation: 1
For Swift
First head to only Crashlytics manual, and Xcode
I Install it on my app. then you will get 'welcome email from Crashlytics'
I try to test crash event following the instruction. https://fabric.io/kits/ios/crashlytics/features
On Web UI of Fabric,
Back to Xcode
Go to Fabric Web UI
Click to the other page of web UI e.g. Retention, Growth etc.
Fabric web UI shows the term & condition request you to enable.
From now on Fabric UI is still showing 'waiting for the event'
You receipt email from fabric, the detail is "Fabric analytics has just been enabled by you"
Stop debugging your app from Xcode
Delete your app from iPhone or simulator
Click Run your app again from Xcode
Try to click button generated event.
Fabric UI dialogue received the trigger event.
That's it. successful
This is my all step after I struggled for many hours. Hope this will help you.
Upvotes: 0
Reputation: 1411
Answering this in 2018 in case someone runs across it. I needed to be connected to wifi for the event to send to Fabric. Either it won't send over cellular or my phone had a bad connection. Worked immediately over wifi.
Upvotes: 1
Reputation: 16249
Mike from Fabric here. Yes, Answers is included within Crashlytics, however no data is collected until you enable it on the Fabric dashboard and accept the terms and conditions specific to Answers. What you need to do is include Crashlytics and once the app is active in your dashboard, then head to any other page in the dashboard and enable Answers from the web UI.
After that, we wait for two minutes to see if we see any event data. Usually, running a clean of your app, build and run (or un-install and re-install) will get the data sent over and then make the dashboard visible. As to why it didn't work earlier in your app, it's still unclear to me, but perhaps a race condition or one of our caches didn't propagate the data correctly.
Edit: Added a picture of what the button to enable Answers looks like.
Upvotes: 0
Reputation: 921
I think that your AppDelegate should look like this:
[Fabric with:@[[Crashlytics class], [Answers class]]];
Upvotes: 0