Skip to content

Commit

Permalink
Merge pull request #53 from amaurymartiny/am-sentry-3
Browse files Browse the repository at this point in the history
Add sentry
  • Loading branch information
amaury1093 committed Nov 18, 2018
2 parents 00ebf1e + adfc399 commit 9290a30
Show file tree
Hide file tree
Showing 5 changed files with 371 additions and 10 deletions.
8 changes: 7 additions & 1 deletion App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
// SPDX-License-Identifier: GPL-3.0

import React, { PureComponent } from 'react';
import { Font } from 'expo';
import { Constants, Font } from 'expo';
import { Provider } from 'mobx-react';
import Sentry from 'sentry-expo';

import { RootStore } from './stores';
import { Background as LoadingBackground } from './Screens/Loading/Background';
Expand All @@ -12,6 +13,11 @@ import { Screens } from './Screens';
// Set up global MST stores
const stores = RootStore.create({ api: undefined, error: false, location: {} });

// Add sentry if available
if (Constants.manifest.extra.sentryPublicDsn) {
Sentry.config(Constants.manifest.extra.sentryPublicDsn).install();
}

export class App extends PureComponent {
state = {
fontLoaded: false
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Before developing the app, you need to fetch your own API tokens for the followi
| Algolia Places | https://community.algolia.com/places/rest.html (`Get Started` button on the bottom) | Optional, lower API rates if not provided. |
| Google Maps for iOS | https://developers.google.com/maps/documentation/ios-sdk/start | Optional in development. |
| Google Maps for Android | https://developers.google.com/maps/documentation/android-api/ | Optional in development. |
| Sentry Bug Tracking | https://sentry.io | Optional. |

Then run the following commands:

Expand Down
17 changes: 16 additions & 1 deletion app.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"expo": {
"android": {
"config": {
"googleMaps": { "apiKey": "YOUR_KEY" }
"googleMaps": {
"apiKey": "YOUR_KEY"
}
},
"icon": "assets/logos/android/playstore-icon.png",
"package": "com.shitismoke.app",
Expand All @@ -15,9 +17,22 @@
"algoliaApplicationId": "YOUR_KEY",
"githubUrl": "https://github.com/amaurymartiny/shoot-i-smoke",
"locationIqKey": "YOUR_KEY",
"sentryPublicDsn": "YOUR_KEY",
"waqiToken": "YOUR_KEY"
},
"githubUrl": "https://github.com/amaurymartiny/shoot-i-smoke",
"hooks": {
"postPublish": [
{
"file": "sentry-expo/upload-sourcemaps",
"config": {
"organization": "YOUR_SENTRY_ORG",
"project": "YOUR_SENTRY_PROJECT",
"authToken": "YOUR_KEY"
}
}
]
},
"icon": "assets/logos/ios/[email protected]",
"ios": {
"buildNumber": "1.2.0",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
"react-navigation": "^2.13.0",
"sentry-expo": "^1.10.0",
"truncate": "^2.0.1"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 9290a30

Please sign in to comment.