autobots-lib
Version:
汽车人基础库
31 lines (25 loc) • 928 B
JavaScript
import { AppRegistry, Platform, NativeModules } from 'react-native';
import RootController from './controller';
import config from './config';
const app = {
Register: function (opt) {
config.set(opt);
AppRegistry.registerComponent(opt.name, () => RootController);
console.reportErrorsAsExceptions = false;
}
}
// if (NativeModules.RNDeviceInfo) {
// console.log('NativeModules.RNDeviceInfo.isConsoleLogShow', NativeModules.RNDeviceInfo.isConsoleLogShow);
// if (typeof NativeModules.RNDeviceInfo.isConsoleLogShow != 'undefined') {
// let isConsoleLogShow = NativeModules.RNDeviceInfo.isConsoleLogShow;
// if (!isConsoleLogShow) {
// console.log('console log switch is off');
// console.info = () => {};
// console.log = () => {};
// console.warn = () => {};
// console.debug = () => {};
// console.error = () => {};
// }
// }
// }
module.exports = app;