react-native-sys-metrics
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

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

Package Sidebar

Install

npm i react-native-sys-metrics

Weekly Downloads

0

Version

0.2.1

License

MIT

Unpacked Size

59.3 kB

Total Files

32

Last publish

Collaborators

  • cj2smith