react-native-sys-metrics
v0.2.1
Published
React Native System Metrics
Downloads
2
Readme
react-native-sys-metrics
Exposes system metrics from iOS (MetrciKit) and soon Android to React Native applications.
Installation
npm install react-native-sys-metrics
Usage
import { subscribeSystemMetrics, SysMetrics } from 'react-native-sys-metrics';
// ...
subscribeSystemMetrics((metrics: SysMetrics) => {
console.log(`got metrics: ${JSON.stringify(metrics)}`);
});
// ...
Testing
You can test that your app handles the MetricKit payload by running your app in XCode on a real device and then selecting "Simulate MetricKit Payloads" from XCode's debug menu.
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library