Munim Technologies

munim-location

Every location feature for React Native and Expo on iOS and Android: permissions, background and headless tracking, geofencing, iBeacons, heading, GNSS and geocoding, powered by Nitro Modules.

Overview

munim-location brings the whole of Core Location and Android's Fused Location Provider, LocationManager and Geofencing APIs to React Native. Ask for foreground or background permission and precise or approximate accuracy, read one-shot or continuous positions with full detail (ellipsoidal and sea-level altitude, floor, speed and bearing accuracy, mock detection), keep tracking while the app is minimised or after it was terminated (iOS background mode, significant changes and visits; Android foreground service, Headless JS and restore after reboot), monitor geofences with enter, exit and dwell, range iBeacons, read the compass and barometric altitude, list GNSS satellites and NMEA on Android, and geocode addresses. Every function is typed, and an Expo config plugin writes the usage strings, background modes and permissions.

Installation

Terminal
npx expo install munim-location react-native-nitro-modules

For bare React Native without Expo: npm install munim-location react-native-nitro-modules

Usage

Positions and geofences
import { addEventListener, addGeofence, getCurrentPosition, requestForegroundPermission, watchPosition, } from 'munim-location' const permission = await requestForegroundPermission() if (permission.foreground) { const here = await getCurrentPosition({ accuracy: 'best', timeoutMs: 15000 }) console.log(here.latitude, here.longitude, here.horizontalAccuracy) } const watchId = watchPosition((location) => console.log('moved', location), (error) => console.warn(error.code), { accuracy: 'nearestTenMeters', distanceFilter: 10, }) await addGeofence({ identifier: 'office', latitude: 37.3349, longitude: -122.009, radius: 150 }) addEventListener('geofenceTransition', (event) => console.log(event.identifier, event.transition))

Requirements

React Native with the New Architecture, react-native-nitro-modules 0.36.5+, and a native development build (Expo Go cannot load Nitro modules). iOS and Android.

Features

  • •Permissions - Foreground and background, precise and approximate, temporary full accuracy, and Android's turn-on-location dialog
  • •Positions - One-shot and continuous updates with accuracy, altitude, speed, bearing, floor and mock detection
  • •Background tracking - Keeps running while the app is minimised: iOS background mode, Android foreground service
  • •Terminated delivery - Significant changes, visits and geofences relaunch the app; Android Headless JS and restore after reboot
  • •Geofencing - Enter, exit and dwell with initial state, expiry and limits (CLMonitor on iOS 17+)
  • •iBeacons - Ranging and region monitoring on iOS
  • •Compass and altimeter - True and magnetic heading, calibration, barometric altitude
  • •GNSS on Android - Satellites, signal strength, NMEA, time to first fix and raw measurements
  • •Geocoding - Forward and reverse with structured addresses on both platforms
  • •Utilities - Distance, bearing, destination and radius checks, capability reports, mock locations for testing
  • •Expo config plugin - Usage strings, background modes, permissions and notification defaults
  • •Nitro Modules - Fully typed Swift, Kotlin, C++ and TypeScript bindings

For the latest API reference, usage examples, and troubleshooting, visit the GitHub repository and npm package page.