0.0.4 • Published 1 year ago

barometer-plugin v0.0.4

Weekly downloads
-
License
MIT
Repository
gitlab
Last release
1 year ago

barometer-plugin

The Barometer Plugin allows developers to access barometric sensor data on iOS devices within their Capacitor or Cordova applications. By utilizing the Core Motion framework, the plugin retrieves altitude information based on atmospheric pressure. Developers can integrate this functionality into their applications to gather real-time altitude data, enabling various use cases such as altitude tracking, elevation-based features, and environmental monitoring. The plugin provides a simple and efficient way to incorporate barometric sensor capabilities into iOS applications, enhancing their functionality and user experience.

Install

npm install barometer-plugin
npx cap sync

API

getPressure()

getPressure() => Promise<{ pressure: number; }>

Returns: Promise<{ pressure: number; }>


For IOS, enable the barometer sensor in the Xcode project settings. Add the following keys to the Info.plist file:

<key>NSMotionUsageDescription</key>
<string>We use the barometric sensor to collect atmospheric pressure data</string>
0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago