Skip to content

Commit

Permalink
v3.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
boehlerlukas committed Nov 13, 2020
1 parent 4e75382 commit 42374cb
Show file tree
Hide file tree
Showing 32 changed files with 73 additions and 96 deletions.
Binary file modified .DS_Store
Binary file not shown.
47 changes: 35 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## BugBattle JavaScript SDK
Achieve better app quality & ratings with comprehensive in-app bug reporting. BugBattle offers affordable In-App Bug Reporting for Apps, WebApps & Websites.
# Bugbattle iOS SDK

![Bugbattle JavaScript SDK Intro](https://github.com/BugBattle/JavaScript-SDK/blob/master/imgs/JavaScriptSDK.png)

The Bugbattle SDK for JavScript is the easiest way to integrate Bugbattle into your apps! Achieve better app quality & ratings with comprehensive in-app bug reporting. BugBattle offers affordable In-App Bug Reporting for Apps, WebApps & Websites.

## Docs & Examples

Checkout our [documentation](https://docs.bugbattle.io/docs/javascript-sdk) for full reference.

## ❤️ Demo

Expand All @@ -20,49 +27,65 @@ Achieve better app quality & ratings with comprehensive in-app bug reporting. Bu

2.) Include the BugBattle JS SDK within your apps.

NPM / YARN:
### Installation via nom

Install the **bugbattle** package via npm or yarn.
```
npm install bugbattle --save
```

OR add the following lines to your website's / webapp's head-tag:
Import the **bugbattle** package.
```
import BugBattle from 'bugbattle';
```

### Manual installation

Add the following lines to your website's / webapp's ```<head>```-tag:
```
<link href="https://jssdk.bugbattle.io/latest/index.css" rel="stylesheet">
<script src="https://jssdk.bugbattle.io/latest/index.js"></script>
<script>let BugBattle = window.BugBattle.default;</script>
```

3.) Initialize the SDK
### Initialize the SDK

Add the following code to your app / website to initialize the BugBattle JavaScript SDK. Replace "YOUR-SDK-TOKEN-HERE" with your actual sdk token.
Add the following code to to initialize the BugBattle JavaScript SDK. Replace "YOUR-SDK-TOKEN-HERE" with your actual SDK token from the [Bugbattle dashboard](https://app.bugbattle.io).

```
<script>
BugBattle.initialize("YOUR-SDK-TOKEN-HERE", BugBattle.FEEDBACK_BUTTON);
</script>
```

Congrats, you are now all set! Report your first bug by using the feedback button.

## 🤤 Customization / tracking more data
## 🤤 Customization

You can track more data (i.e. the app build number, version code or custom data) by using one of the following functions.

```
// Set's the main color (color schema).
// Sets the main color (color schema).
BugBattle.setMainColor("#086EFB");
// Set's the app's build number.
// Sets the app's build number.
BugBattle.setAppBuildNumber(5);
// Set's the app's version code.
// Sets the app's version code.
BugBattle.setAppVersionCode("v5.0");
// Attaches custom data to the bug reports.
BugBattle.setCustomData({
test1: "Battle",
data2: "Unicorn"
});
// Enables the privacy policy check.
BugBattle.enablePrivacyPolicy(true);
// Sets the privacy policy.
BugBattle.setPrivacyPolicyUrl("https://someawesomesite...");
// Enables the automatic detection of crashes.
BugBattle.enableCrashDetector(true);
```

## 🤠 Activation methods
Expand Down
6 changes: 3 additions & 3 deletions build/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/index.css.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions build/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/index.js.map

Large diffs are not rendered by default.

Binary file added demo/.DS_Store
Binary file not shown.
Binary file added demo/bugbattlelogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 42374cb

Please sign in to comment.