npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-location-manager-ios

v1.0.2

Published

React Native Location Manager Bridge for iOS

Readme

react-native-location-manager-ios

React Native Location Manager Bridge for iOS

This module is intended for advanced usage, if you only need basic geolocation functionality you will be better with React Native Geolocation module.

Installation

yarn add react-native-location-manager-ios

Automatic linking

react-native link react-native-location-manager-ios

Manual linking

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-location-manager-iosios and add RCTLocationManagerIOS.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRCTLocationManagerIOS.a to your project's Build PhasesLink Binary With Libraries

Usage Description

Add to your Info.plist apropriate *UsageDescription keys with a string value explaining to the user how the app uses location data. Please see official documentation

<key>NSLocationWhenInUseUsageDescription</key>
<string>Some description</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Some description</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Some description</string>

Usage

import LocationManagerIOS from 'react-native-location-manager-ios';

API

Events

Event names are available under LocationManagerIOS.Events object.

const subscription = LocationManagerIOS.addListener(LocationManagerIOS.Events.didUpdateLocations, console.log);
// ...
subscription.remove();

See CLLocationManagerDelegate for in-depth details.

| Event | Listener Arguments | Notes |---|---|---| | didUpdateLocations | locations: Array<Location> | | didFailWithError | error: Error | | didFinishDeferredUpdatesWithError | error: Error | | didPauseLocationUpdates | | | didResumeLocationUpdates | | | didUpdateHeading | heading: Heading | | didEnterRegion | region: Region | | didExitRegion | region: Region | | didDetermineStateForRegion | { region: Region, state: RegionState } | | monitoringDidFailForRegion | { region: Region, error: Error } | | didStartMonitoringForRegion | region: Region | | didRangeBeaconsInRegion | { beacons: Array<Beacon>, region: BeaconRegion } | | rangingBeaconsDidFailForRegion | { region: BeaconRegion, error: Error } | | didVisit | visit: Visit | | didChangeAuthorizationStatus | status: AuthorizationStatus |

Enums

LocationManagerIOS.addListener(LocationManagerIOS.Events.didFailWithError, (err) => {
  if (err.code === LocationManagerIOS.Error.LocationUnknown) {
    // ...
  }
});

| Enum | Keys |---|---| | AuthorizationStatus | NotDetermined, Restricted, Denied, AuthorizedAlways, AuthorizedWhenInUse | LocationAccuracy | BestForNavigation, Best, NearestTenMeters, HundredMeters, Kilometer, ThreeKilometers | DistanceFilter | None | ActivityType | Other, AutomotiveNavigation, Fitness, OtherNavigation | DeviceOrientation | Unknown, Portrait, PortraitUpsideDown, LandscapeLeft, LandscapeRight, FaceUp, FaceDown | RegionState | Unknown, Inside, Outside | Proximity | Unknown, Immediate, Near, Far | Error | LocationUnknown, Denied, Network, HeadingFailure, RegionMonitoringDenied, RegionMonitoringFailure, RegionMonitoringSetupDelayed, RegionMonitoringResponseDelayed, GeocodeFoundNoResult, GeocodeFoundPartialResult, GeocodeCanceled, DeferredFailed, DeferredNotUpdatingLocation, DeferredAccuracyTooLow, DeferredDistanceFiltered, DeferredCanceled, RangingUnavailable, RangingFailure

Properties

Property getters return a promise resolved with the property value.

See CLLocationManager for in-depth details.

const monitoredRegions = await LocationManagerIOS.monitoredRegions;
monitoredRegions.forEach(console.log)

const distanceFilter = await LocationManagerIOS.distanceFilter;
if (distanceFilter === LocationManagerIOS.DistanceFilter.None) {
  LocationManagerIOS.distanceFilter = 3;
}

LocationManagerIOS.desiredAccuracy = LocationManagerIOS.LocationAccuracy.BestForNavigation;

LocationManagerIOS.activityType = LocationManagerIOS.ActivityType.AutomotiveNavigation;

| Property | Type | Notes |---|---|---| | pausesLocationUpdatesAutomatically | bool | | allowsBackgroundLocationUpdates | bool | | showsBackgroundLocationIndicator | bool | | distanceFilter | double | | desiredAccuracy | double | | activityType | ActivityType | | headingFilter | double | | headingOrientation | DeviceOrientation | | maximumRegionMonitoringDistance | double | readonly | monitoredRegions | Array<CircularRegion> | readonly | rangedRegions | Array<BeaconRegion> | readonly | location | Location | readonly | heading | Heading | readonly

Methods

Non void methods return a promise which will resolve to the according type.

See CLLocationManager for in-depth details.

| Method | Arguments | Return | Notes |---|---|---|---| | addListener | event: string, listener: function | {remove: function} | custom | authorizationStatus | | AuthorizationStatus | | locationServicesEnabled | | bool | | deferredLocationUpdatesAvailable | | bool | | significantLocationChangeMonitoringAvailable | | bool | | headingAvailable | | bool | | isRangingAvailable | | bool | | requestWhenInUseAuthorization | | void | | requestAlwaysAuthorization | | void | | startUpdatingLocation | | void | | stopUpdatingLocation | | void | | requestLocation | | void | | startMonitoringSignificantLocationChanges | | void | | stopMonitoringSignificantLocationChanges | | void | | startUpdatingHeading | | void | | stopUpdatingHeading | | void | | dismissHeadingCalibrationDisplay | | void | | startMonitoringForRegion | identifier: string, latitude: double, longitude: double, radius: double, notifyOnEntry: bool, notifyOnExit: bool | void | | stopMonitoringForRegion | identifier: string | void | | stopMonitoringForAllRegions | | void | custom | startRangingBeaconsInRegion | identifier: string, proximityUUID: string, major: int, minor: int, notifyOnEntry: bool, notifyOnExit: bool | void | | stopRangingBeaconsInRegion | identifier: string | void | | stopRangingBeaconsInAllRegions | | void | custom | requestStateForRegion | identifier: string | void | | startMonitoringVisits | | void | | stopMonitoringVisits | | void | | allowDeferredLocationUpdatesUntilTraveled | distance: double, timeout: double | void | | disallowDeferredLocationUpdates | | void |

Types

type Error {
  code: int,
  domain: string,
}
type Location {
  altitude: double,
  horizontalAccuracy: double,
  verticalAccuracy: double,
  speed: double,
  course: double,
  timestamp: double, // precision is to the millisecond
  coordinate: Coordinate,
}
type Coordinate {
  latitude: double,
  longitude: double,
}
type Region {
  identifier: string,
  notifyOnEntry: bool,
  notifyOnExit: bool,
}
type CircularRegion {
  identifier: string,
  radius: double,
  center: Coordinate,
  notifyOnEntry: bool,
  notifyOnExit: bool,
}
type BeaconRegion {
  identifier: string,
  proximityUUID: string,
  major: int,
  minor: int,
  notifyOnEntry: bool,
  notifyOnExit: bool,
}
type Beacon {
  proximityUUID: string,
  major: int,
  minor: int,
  proximity: LocationManagerIOS.Proximity,
  accuracy: double,
  rssi: long,
}
type Visit {
  horizontalAccuracy: double,
  arrivalDate: double, // precision is to the millisecond
  departureDate: double, // precision is to the millisecond
  coordinate: Coordinate,
}
type Heading {
  magneticHeading: double,
  trueHeading: double,
  headingAccuracy: double,
  timestamp: double, // precision is to the millisecond
  x: double,
  y: double,
  z: double,
}

Custom

LocationManagerIOS.stopMonitoringForAllRegions()

Native implementation for:

const monitoredRegions = await LocationManagerIOS.monitoredRegions;
monitoredRegions.map(r => r.identifier)
  .forEach(LocationManagerIOS.stopMonitoringForRegion);

LocationManagerIOS.stopRangingBeaconsInAllRegions()

Native implementation for:

const rangedRegions = await LocationManagerIOS.rangedRegions;
rangedRegions.map(r => r.identifier)
  .forEach(LocationManagerIOS.stopRangingBeaconsInRegion);