So, Fabric.io is a great tool, although they don’t have much setup information for Ionic/Cordova.
First off, follow what they say… installing the IDE plugin, etc.
Now. Ionic uses gradle for its building. You would expect the install to work right away, but it wont. Ionic/Cordova overwrites the build.gradle definitions in the dependencies section.
Anyway, first off open build.gradle, and in buildscript > repositories, if its not already in there, add
jcenter() maven { url 'https://maven.fabric.io/public' }
Next, there are 3 dependencies for each gradle version. if you know what version you are running, great. otherwise add the following to all of them.
classpath 'io.fabric.tools:gradle:1.+'
Now what we need to do is extend gradle’s build.
Create a file in your android/ios directory called build-extras.gradle.
Inside this, we need to define the repositories.
apply plugin: 'io.fabric' repositories { jcenter() maven { url 'https://maven.fabric.io/public' } } dependencies { // Crashlytics Kit compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') { transitive = true } }
Now, when you run or build the app, it should work, although Fabric.io won’t recognize your app.
We will need to install a cordova plugin,
The one I use is:
https://www.npmjs.com/package/cordova-fabric-plugin
After this is installed, add a force crash and rebuild & run your app.
If it is still not working, make sure you do not have any ad-blocking software installed. Even if you don’t but you have in the past, reinstall it and make sure all settings are reset (I.E AdAway edits your hosts files, uninstalling it does not reset them, you need to reset them then you can uninstall them).
Hope this has helped anyone else who had issues setting it up.
EDIT
Currently Crashlytics does not support custom stacktraces. All crashes will come from the Crashlytics/Fabric.io plugin. You have to use the logs to specify the error.