Use the native Fabric Crashlytics iOS / Android SDK in Appcelerator Titanium.
- iOS: Titanium SDK 7.3.0+
- Android: Titanium SDK 7.0.0+
In general, remember to not use any Crashlytics API's before actually opening your first window. While this might not result
in a crash on iOS, the native Android SDK will error if being used before your app finished launching due to requiring the
native Activity
.
- Create a new folder
scripts/
in your project root - Inside
scripts/
, create ascript-titanium-crashlytics.sh
with the following contents (replace the version with your version):
# Do not run this file manually! It is referenced from your native Xcode project
"../../modules/iphone/ti.crashlytics/1.1.0/platform/Fabric.framework/run" <YOUR_API_KEY> <YOUR_SECRET_KEY>
2a. If using Firebase, remember to have your GoogleService-Info.plist
in place, as described here.
3. Add your API key to the plist section of your tiapp.xml:
<key>Fabric</key>
<dict>
<key>APIKey</key>
<string>YOUR_API_KEY</string>
<key>Kits</key>
<array>
<dict>
<key>KitInfo</key>
<dict/>
<key>KitName</key>
<string>Crashlytics</string>
</dict>
</array>
</dict>
- You are ready to go!
- Add the following to the
<application>
tag inside the manifest configuration in your tiapp.xml:
<meta-data android:name="io.fabric.ApiKey" android:value="YOUR_API_KEY" />
- You are ready to go!
See the Sample App for an example of configuring the required API keys and project settings.
Simulate a crash (for testing purpose)
Simulate an exception (for testing purpose)
Log a Custom Event to see user actions that are uniquely important for your app in real-time.
The params
parameter is an iOS-only Object
.
Specify a user identifier which will be visible in the Crashlytics UI.
Specify a user name which will be visible in the Crashlytics UI.
Specify a user email which will be visible in the Crashlytics UI.
This method can be used to record a single exception structure in a report.
Hans Knöchel (@hansemannnn / Web)
MIT
Code contributions are greatly appreciated, please submit a new Pull-Request!