...
 
Commits (7)
......@@ -60,4 +60,7 @@ buck-out/
# Jest cache
.jest/
coverage/
\ No newline at end of file
coverage/
# Sentry secrets
sentry.properties
\ No newline at end of file
......@@ -63,6 +63,11 @@ import connectivityService from './src/common/services/connectivity.service';
import sqliteStorageProviderService from './src/common/services/sqlite-storage-provider.service';
import commentStorageService from './src/comments/CommentStorageService';
import { Sentry } from 'react-native-sentry';
Sentry.config('https://d650fc58f2da4dc8ae9d95847bce152d@sentry.io/1538735').install();
let deepLinkUrl = '';
// init push service
......@@ -76,6 +81,12 @@ CookieManager.clearAll();
// On app login (runs if the user login or if it is already logged in)
sessionService.onLogin(async () => {
const user = sessionService.getUser();
Sentry.setUserContext({
userID: user.guid
});
logService.info('[App] Getting minds settings and onboarding progress');
// load minds settings and onboarding progresss on login
const results = await Promise.all([mindsService.getSettings(), stores.onboarding.getProgress()]);
......
......@@ -79,6 +79,7 @@ project.ext.react = [
]
apply from: "../../node_modules/react-native/react.gradle"
apply from: "../../node_modules/react-native-sentry/sentry.gradle"
/**
* Set this to true to create two separate APKs instead of one:
......@@ -162,6 +163,7 @@ android {
}
dependencies {
implementation project(':react-native-sentry')
implementation project(':react-native-notifications')
implementation project(':@react-native-community_netinfo')
implementation project(':react-native-screens')
......
......@@ -3,6 +3,7 @@ package com.minds.mobile;
import android.app.Application;
import com.facebook.react.ReactApplication;
import io.sentry.RNSentryPackage;
import com.reactnativejitsimeet.JitsiMeetPackage;
import com.wix.reactnativenotifications.RNNotificationsPackage;
import com.reactnativecommunity.netinfo.NetInfoPackage;
......@@ -56,6 +57,7 @@ public class MainApplication extends Application implements ShareApplication, Re
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNSentryPackage(),
new JitsiMeetPackage(),
new NetInfoPackage(),
new RNScreensPackage(),
......
......@@ -25,6 +25,7 @@ platform :android do
lane :assemble_build do
sh("echo $ANDROID_KEYSTORE | base64 --decode > ../app/minds.keystore")
sh("echo $ANDROID_KEYSTORE | base64 --decode > ../minds.keystore")
sh("echo $SENTRY_ANDROID_PROPERTIES | base64 --decode > ../sentry.properties")
gradle(
task: "assemble",
build_type: "Release",
......@@ -42,7 +43,7 @@ platform :android do
lane :beta do
gradle(task: "clean assembleRelease")
crashlytics
# sh "your_script.sh"
# You can also use other beta testing services here
end
......
rootProject.name = 'Minds'
include ':react-native-sentry'
project(':react-native-sentry').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-sentry/android')
include ':react-native-jitsi-meet'
project(':react-native-jitsi-meet').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-jitsi-meet/android')
include ':react-native-notifications'
......
This diff is collapsed.
......@@ -10,6 +10,11 @@
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
#if __has_include(<React/RNSentry.h>)
#import <React/RNSentry.h> // This is used for versions of react >= 0.40
#else
#import "RNSentry.h" // This is used for versions of react < 0.40
#endif
#import <React/RCTLinkingManager.h>
@implementation AppDelegate
......@@ -17,9 +22,10 @@
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"Minds"
initialProperties:nil];
[RNSentry installWithRootView:rootView];
rootView.backgroundColor = [UIColor whiteColor];
......
......@@ -27,6 +27,7 @@ platform :ios do
desc "Build release"
lane :buildrelease do
sh("echo $SENTRY_IOS_PROPERTIES | base64 --decode > ../sentry.properties")
match(type: "appstore")
increment_build_number(xcodeproj: "Minds.xcodeproj", build_number: latest_testflight_build_number + 1)
build_app(scheme: "Minds")
......
......@@ -5,6 +5,7 @@ import AsyncStorage from '@react-native-community/async-storage';
import storageService from './storage.service';
import settingsService from '../../settings/SettingsService'
import settingsStore from '../../settings/SettingsStore';
import { Sentry } from 'react-native-sentry';
const parseErrorStack = error => {
if (!error || !error.stack) {
......@@ -59,10 +60,15 @@ class LogService {
}
exception(prepend, error) {
if (!error) {
error = prepend;
prepend = null;
}
// report the issue to sentry
Sentry.captureException(error);
let stack = null;
if (__DEV__) {
stack = parseErrorStack(error);
......
......@@ -66,6 +66,7 @@ export default class ConversationScreen extends Component {
};
componentWillMount() {
this.store = new MessengerConversationStore();
const params = this.props.navigation.state.params;
let conversation;
......
This diff is collapsed.