1.0.1 • Published 5 years ago
react-native-os-logger v1.0.1
react-native-os-logger
Brings os_log to React Native: https://developer.apple.com/documentation/os/logging
Only the default log level is now supported – it's fine for debug purposes. The logs can be read in Console.app even when the app is not launched with debugger.
Getting started
$ npm install react-native-os-logger --save
Mostly automatic installation
$ react-native link react-native-os-logger
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-os-logger
and addOsLogger.xcodeproj
- In XCode, in the project navigator, select your project. Add
libOsLogger.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
Usage
import OsLogger from 'react-native-os-logger';
// TODO: What to do with the module?
OsLogger;