|
|
@@ -1,5 +1,6 @@
|
|
|
import React, { Component } from 'react';
|
|
|
-import { View, Text, StyleSheet, Clipboard, Platform } from 'react-native';
|
|
|
+import { View, Text, StyleSheet, Platform } from 'react-native';
|
|
|
+import Clipboard from '@react-native-clipboard/clipboard';
|
|
|
import Button from '../../components/Button';
|
|
|
import PushNotification from "react-native-push-notification";
|
|
|
import Dialog from '../../components/Dialog';
|
|
|
@@ -7,6 +8,7 @@ import apiUpload from '../../api/apiUpload';
|
|
|
import app from '../../../app.json'
|
|
|
import utils from '../../utils/utils';
|
|
|
import Skeleton from '../../components/VbeSkeleton';
|
|
|
+import crashlytics from '@react-native-firebase/crashlytics';
|
|
|
|
|
|
export default class Notify extends Component {
|
|
|
constructor(props) {
|
|
|
@@ -116,6 +118,13 @@ export default class Notify extends Component {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ async testCrashlytics() {
|
|
|
+ console.log("测试触发崩溃");
|
|
|
+ await crashlytics().setCrashlyticsCollectionEnabled(true);
|
|
|
+ crashlytics().log("Test Crashlytics...");
|
|
|
+ crashlytics().crash();
|
|
|
+ }
|
|
|
+
|
|
|
render() {
|
|
|
return (
|
|
|
<View style={styles.container}>
|
|
|
@@ -153,6 +162,13 @@ export default class Notify extends Component {
|
|
|
/>
|
|
|
</View>
|
|
|
}
|
|
|
+ <View style={styles.text}>
|
|
|
+ <Button
|
|
|
+ text='Test Crashlytics'
|
|
|
+ elevation={2}
|
|
|
+ onClick={() => this.testCrashlytics()}
|
|
|
+ />
|
|
|
+ </View>
|
|
|
<View style={[ui.flex1, ui.flexcc]}>
|
|
|
<Text style={styles.os}>{Platform.OS}</Text>
|
|
|
</View>
|