https://github.com/hypery2k/nativescript-fabric
Handling App URLs in nativescript apps
https://github.com/hypery2k/nativescript-fabric
android farming ios nativescript nativescript-plugin
Last synced: 18 days ago
JSON representation
Handling App URLs in nativescript apps
- Host: GitHub
- URL: https://github.com/hypery2k/nativescript-fabric
- Owner: hypery2k
- License: mit
- Created: 2016-11-28T07:11:25.000Z (over 8 years ago)
- Default Branch: develop
- Last Pushed: 2024-05-30T20:57:12.000Z (11 months ago)
- Last Synced: 2025-04-12T09:14:53.842Z (18 days ago)
- Topics: android, farming, ios, nativescript, nativescript-plugin
- Language: JavaScript
- Homepage:
- Size: 2.84 MB
- Stars: 30
- Watchers: 5
- Forks: 14
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# NativeScript Fabric Plugin  
[](https://greenkeeper.io/)
[](https://travis-ci.org/hypery2k/nativescript-fabric)
[](bitcoin:3NKtxw1SRYgess5ev4Ri54GekoAgkR213D)[](http://badge.fury.io/js/nativescript-fabric)
[](https://codeclimate.com/github/hypery2k/nativescript-fabric/maintainability)[](https://nodei.co/npm/nativescript-fabric/)
> Feel free to **donate**
>
>
>![]()
>
> Or donate Bitcoins: bitcoin:3NKtxw1SRYgess5ev4Ri54GekoAgkR213D
>
> [](bitcoin:3NKtxw1SRYgess5ev4Ri54GekoAgkR213D)
>
> Also via [greenaddress](https://greenaddress.it/pay/GA3ZPfh7As3Gc2oP6pQ1njxMij88u/)# Usage
## Installation
Go to [Crashlytics](https://fabric.io/kits/ios/crashlytics/install) and pick of the needed API-Key and API-Secret:

Create a file fabric.json in the project root folder and add the API-Key and API-Secret:
```
{
"using_ios": true,
"using_android": true,
"api_key": "...",
"api_secret": "..."
}
``````
$ tns plugin add nativescript-fabric
```Or if you want to use the development version (nightly build), which maybe not stable!:
```
$ tns plugin add nativescript-fabric@next
```### Android
Add the API-Key to your AndroidManifest.xml:
```
....
...
```
### iOS
No further confiugration needed## Additional information
### Android
For more details see [fabric.io/kits/android/crashlytics](https://fabric.io/kits/android/crashlytics/install).
### iOS
For more details see [fabric.io/kits/ios/crashlytics](https://fabric.io/kits/ios/crashlytics/manual-install?step=1).
## API
Init the plugin in your app (for angular apps use main.ts):
```
import { Fabric } from 'nativescript-fabric';
Fabric.init();
```Afterwards you can use the instance methods for logging (general error logging is already added):
* `Fabric.logSignUp(method: string, success: boolean);`
* `Fabric.logLogin(method: string, success: boolean);`
* `Fabric.logContentView(id: string, name: string, type: string)`
* `Fabric.logCustomEvent(withName: string, customAttributes: Map)`
* `Fabric.logError(error: any, msg?: string)`## Angular
```
import { FabricModule } from 'nativescript-fabric/angular';NgModule({
...
imports: [
FabricModule.forRoot()
],```
# Known Issues## com.android.ide.common.process.ProcessException
```
FAILURE: Build failed with an exception.* What went wrong:
Execution failed for task ':app:transformClassesWithDexForF0F1F2F3F4F5Debug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: Cannot merge new index 69013 into a non-jumbo instruction!nto a non-jumbo instruction!```
set the following in your app.gradle:
```
android {
...
dexOptions {
jumboMode true
}}
```## XML Parsing error
```
Error:/app/build/intermediates/res/merged/debug/values/com_crashlytics_build_id.xml uncompiled XML file passed as argument. Must be compiled first into .flat file.
```Try adding:
```
android.enableAapt2 = false
```
to your `gradle.properties` file.