Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hansemannn/titanium-crashlytics

Use the native Crashlytics SDK in Titanium (iOS / Android).
https://github.com/hansemannn/titanium-crashlytics

appcelerator axway crashlytics fabric javascript native titanium

Last synced: 2 months ago
JSON representation

Use the native Crashlytics SDK in Titanium (iOS / Android).

Awesome Lists containing this project

README

        

# Crashlytics in Titanium

Use the native Crashlytics iOS / Android SDK in Titanium.

## Supporting this effort

The whole Firebase support in Titanium is developed and maintained by the community (`@hansemannn` and `@m1ga`). To keep
this project maintained and be able to use the latest Firebase SDK's, please see the "Sponsor" button of this repository,
thank you!

## Requirements

- [x] iOS: Titanium SDK 10.0.0+
- [x] Android: Titanium SDK 9.0.0+

## Setup

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`.

### iOS

1. Create a new folder `scripts/` in your project root
2. Copy the `run` and `upload-symbols` shell files from this repo's `helper/` directory to `scripts/` in your project
3. Make sure your Firebase project is configured properly and you have your `GoogleService-Info.plist` in place
as described [here](https://github.com/hansemannn/titanium-firebase).
4. Make sure the upload-symbols file's permissions are correct, running `chmod +x PROJ_ROOT_PATH/scripts/upload-symbols`
(replace PROJ_ROOT_PATH with your real project root path)

5. You are ready to go!

### Android

```
var crash = require("ti.crashlytics");
crash.crash(); // test crash
```

1. Add the following to the `` tag inside the manifest configuration in your tiapp.xml:
```xml



```
2. You are ready to go!

## Example

See the [Sample App](https://github.com/hansemannn/titanium-crashlytics-demo/blob/master/README.md) for an example of configuring
the required API keys and project settings.

## API's

### Cross platform API's

### `Crashlytics.log(message)`

Log a Custom Event to see user actions that are uniquely important for your app in real-time.

### `Crashlytics.userId = myUserId`

Specify a user identifier which will be visible in the Crashlytics UI.

### `Crashlytics.recordError({ domain, code, userInfo })`

Records non-fatal errors. Note: The `code` and `userInfo` parameters are iOS-only.

### Android only API's

### `Crashlytics.crash()`

Simulate a crash (for testing purpose)

### `Crashlytics.throwException()`

Simulate an exception (for testing purpose)

## Author

Hans Knöchel ([@hansemannnn](https://twitter.com/hansemannnn) / [Web](https://hans-knoechel.de))

## License

MIT

## Contributing

Code contributions are greatly appreciated, please submit a new [Pull-Request](https://github.com/hansemannn/titanium-crashlytics/pull/new/master)!