{"id":31755607,"url":"https://github.com/jingjing2222/react-native-nitro-geolocation","last_synced_at":"2026-06-14T06:01:08.492Z","repository":{"id":317399574,"uuid":"1066827633","full_name":"jingjing2222/react-native-nitro-geolocation","owner":"jingjing2222","description":"A React Native Geolocation module Using Nitro","archived":false,"fork":false,"pushed_at":"2026-06-13T17:17:29.000Z","size":35941,"stargazers_count":101,"open_issues_count":3,"forks_count":5,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-13T19:12:03.613Z","etag":null,"topics":["android","fused-location","geocoding","geolocation","gps","ios","jsi","location","new-architecture","nitro","nitro-modules","react","react-native"],"latest_commit_sha":null,"homepage":"https://react-native-nitro-geolocation.pages.dev/","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jingjing2222.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-09-30T02:37:49.000Z","updated_at":"2026-06-13T17:16:48.000Z","dependencies_parsed_at":"2025-09-30T17:42:33.057Z","dependency_job_id":"ef1a41c3-02c6-4607-a572-ab310c1f8787","html_url":"https://github.com/jingjing2222/react-native-nitro-geolocation","commit_stats":null,"previous_names":["jingjing2222/react-native-nitro-geolocation"],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/jingjing2222/react-native-nitro-geolocation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jingjing2222%2Freact-native-nitro-geolocation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jingjing2222%2Freact-native-nitro-geolocation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jingjing2222%2Freact-native-nitro-geolocation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jingjing2222%2Freact-native-nitro-geolocation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jingjing2222","download_url":"https://codeload.github.com/jingjing2222/react-native-nitro-geolocation/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jingjing2222%2Freact-native-nitro-geolocation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34310801,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","fused-location","geocoding","geolocation","gps","ios","jsi","location","new-architecture","nitro","nitro-modules","react","react-native"],"created_at":"2025-10-09T18:54:54.185Z","updated_at":"2026-06-14T06:01:08.474Z","avatar_url":"https://github.com/jingjing2222.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-nitro-geolocation\n\n[![NPM](https://img.shields.io/npm/v/react-native-nitro-geolocation)](https://www.npmjs.com/package/react-native-nitro-geolocation)\n\n**Nitro-powered geolocation for modern React Native apps**\n\nA native iOS/Android geolocation module for React Native 0.75+ apps using the\nNew Architecture and Nitro Modules. Start by replacing\n[`@react-native-community/geolocation`](https://github.com/michalchudziak/react-native-geolocation)\nwith `/compat`, then move to a typed Modern API when you are ready.\nThe current release line adds web support for Modern and `/compat` foreground\ngeolocation plus a native Background Location API for tracking, geofencing,\nstorage recovery, Headless JS, and HTTP sync.\n\n- 🎯 **Simple functional API** — Direct function calls, no complex abstractions\n- ⚡ **JSI-powered performance** — Direct native calls without Bridge overhead\n- 🔁 **Compat API** — Drop-in compatible with the core native community API\n- 🧹 **Automatic cleanup** — No manual subscription management\n- 📱 **Consistent behavior** across iOS and Android\n- 🛠️ **DevTools Plugin** — Mock locations with interactive map (Rozenite)\n\n![react-native-nitro-geolocation](https://raw.githubusercontent.com/jingjing2222/react-native-nitro-geolocation/main/demo.gif)\n\n---\n\n## 📘 Documentation\n\nFull documentation available at:\n👉 [https://react-native-nitro-geolocation.pages.dev](https://react-native-nitro-geolocation.pages.dev)\n\n---\n\n## When should I use this?\n\n| Use case | Recommendation |\n|---|---|\n| Bare React Native 0.75+ app with New Architecture/Nitro enabled | Use Nitro Geolocation |\n| Migrating from `@react-native-community/geolocation` | Start with `/compat` |\n| New Architecture / Nitro-based app | Recommended |\n| Expo development build or custom native build | Supported with native setup |\n| Expo managed app without native rebuild | Use `expo-location` |\n| Web support required | Use the Modern API root import or `/compat` callback API |\n| Full background tracking / geofencing | Use `react-native-nitro-geolocation/background` |\n\nWeb support is available for the Modern API root import and the `/compat`\nsubpath. Browser builds resolve both entries to implementations backed by\n`navigator.geolocation` and do not load Nitro native bindings. Background\nlocation remains native-only.\n\n---\n\n## 🧭 Introduction\n\nReact Native Nitro Geolocation provides **three public API surfaces** to fit\nyour needs:\n\n### 1. Modern API (Recommended)\n\n**Simple functional API** with direct calls and a single hook for tracking:\n\n```tsx\nimport {\n  setConfiguration,\n  requestPermission,\n  getCurrentPosition,\n} from \"react-native-nitro-geolocation\";\n\nsetConfiguration({\n  authorizationLevel: \"whenInUse\",\n  locationProvider: \"auto\",\n});\n\nconst status = await requestPermission();\n\nif (status === \"granted\") {\n  const position = await getCurrentPosition({\n    accuracy: { android: \"high\", ios: \"best\" },\n    timeout: 15_000,\n  });\n}\n```\n\nSee the [Modern API guide](https://react-native-nitro-geolocation.pages.dev/guide/modern-api)\nfor watches, geocoding, heading, cached reads, Android settings, and iOS\naccuracy authorization.\n\n### 2. Compat API (Compatibility)\n\nDrop-in compatible with the core native\n`@react-native-community/geolocation` API:\n\n```tsx\nimport Geolocation from \"react-native-nitro-geolocation/compat\";\n\nGeolocation.getCurrentPosition(\n  (position) =\u003e console.log(position),\n  (error) =\u003e console.error(error),\n  { enableHighAccuracy: true }\n);\n\nconst watchId = Geolocation.watchPosition((position) =\u003e console.log(position));\nGeolocation.clearWatch(watchId);\n```\n\nThe `/compat` subpath covers the core native community API, including\n`setRNConfiguration`, `requestAuthorization`, `getCurrentPosition`,\n`watchPosition`, `clearWatch`, and `stopObserving`. It also has a browser entry\nfor callback-style foreground geolocation. See the\n[Compat API guide](https://react-native-nitro-geolocation.pages.dev/guide/compat-api)\nfor the full compatibility matrix and option notes.\n\n### 3. Background API\n\nNative background tracking, geofencing, activity events, Android Headless JS,\nHTTP sync, stored event recovery, and silent-delivery diagnosis should use the\nexplicit background subpath.\n\nBackground location is native-only. Browser builds expose unsupported stubs so\nweb bundles can still import shared code safely. Start with the\n[Background Location guide](https://react-native-nitro-geolocation.pages.dev/background/overview)\nfor permissions, start/stop, geofencing, storage recovery, and native sync.\nUse `diagnoseBackgroundLocation()` from the same subpath to turn the raw\nbackground status into actionable issues when delivery is silent.\n\n---\n\n## ⚡ Quick Start\n\n### 1. Installation\n\n```bash\n# Install Nitro core and Geolocation module\nyarn add react-native-nitro-modules react-native-nitro-geolocation\n\n# or using npm\nnpm install react-native-nitro-modules react-native-nitro-geolocation\n```\n\nRebuild your native app:\n\n```bash\ncd ios \u0026\u0026 pod install\n```\n\n---\n\n### 2. iOS Setup\n\nAdd permissions to your **Info.plist**:\n\n```xml\n\u003ckey\u003eNSLocationWhenInUseUsageDescription\u003c/key\u003e\n\u003cstring\u003eThis app requires access to your location while it's in use.\u003c/string\u003e\n\u003ckey\u003eNSLocationAlwaysAndWhenInUseUsageDescription\u003c/key\u003e\n\u003cstring\u003eThis app requires access to your location at all times.\u003c/string\u003e\n```\n\nFor background tracking, also enable the `location` background mode in\n`UIBackgroundModes`.\n\n---\n\n### 3. Android Setup\n\nAdd permissions to **AndroidManifest.xml**:\n\n```xml\n\u003cuses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" /\u003e\n\u003cuses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" /\u003e\n```\n\nOptional (for background):\n\n```xml\n\u003cuses-permission android:name=\"android.permission.ACCESS_BACKGROUND_LOCATION\" /\u003e\n```\n\nFull background tracking uses a foreground service on Android. Add the full\npermission set from the Android background setup guide when using\n`react-native-nitro-geolocation/background`, including Android 13+\n`POST_NOTIFICATIONS` for the tracking notification.\n\n---\n\n### 4. DevTools Plugin\n\nUse the Rozenite DevTools plugin to mock locations during development with an\ninteractive map. It works with the Modern API root import.\n\n![DevTools Plugin Demo](https://raw.githubusercontent.com/jingjing2222/react-native-nitro-geolocation/main/devtools.gif)\n\n```bash\nyarn add @react-native-nitro-geolocation/rozenite-plugin\n```\n\n```tsx\nimport {\n  createPosition,\n  useGeolocationDevTools,\n} from \"@react-native-nitro-geolocation/rozenite-plugin\";\n\nfunction App() {\n  useGeolocationDevTools({\n    initialPosition: createPosition(\"Seoul, South Korea\"),\n  });\n\n  return \u003cRootNavigator /\u003e;\n}\n```\n\nThe plugin requires Rozenite DevTools in your app. See the\n[DevTools Plugin guide](https://react-native-nitro-geolocation.pages.dev/guide/devtools)\nfor setup, presets, troubleshooting, and the demo.\n\n---\n\n### 5. Continue In The Docs\n\nUse the docs site for the detailed flows:\n\n- [Quick Start](https://react-native-nitro-geolocation.pages.dev/guide/quick-start) - install, set native permissions, and read your first location.\n- [Modern API](https://react-native-nitro-geolocation.pages.dev/guide/modern-api) - accuracy presets, watches, Android settings, cached reads, geocoding, heading, and iOS accuracy authorization.\n- [Compat API](https://react-native-nitro-geolocation.pages.dev/guide/compat-api) - callback compatibility and web behavior.\n- [Background Location](https://react-native-nitro-geolocation.pages.dev/background/overview) - native background tracking, geofencing, storage recovery, Headless JS, HTTP sync, and delivery diagnosis.\n- [Migration Assistance](https://react-native-nitro-geolocation.pages.dev/guide/migration-assistance) - choose the community or service migration path.\n- [Expo Development Builds](https://react-native-nitro-geolocation.pages.dev/guide/expo-development-build) - use the package in Expo custom native builds.\n- [DevTools Plugin](https://react-native-nitro-geolocation.pages.dev/guide/devtools) - mock locations during development.\n\n## 📖 Learn More\n\n- [Introduction](https://react-native-nitro-geolocation.pages.dev/guide/)\n- [Quick Start Guide](https://react-native-nitro-geolocation.pages.dev/guide/quick-start)\n- [Modern API Reference](https://react-native-nitro-geolocation.pages.dev/guide/modern-api)\n- [Compat API Reference](https://react-native-nitro-geolocation.pages.dev/guide/compat-api)\n- [Migration Skills](https://react-native-nitro-geolocation.pages.dev/guide/migration-assistance)\n- [Community Migration](https://react-native-nitro-geolocation.pages.dev/guide/community-migration)\n- [Service Migration](https://react-native-nitro-geolocation.pages.dev/guide/service-migration)\n- [Expo Development Build Guide](https://react-native-nitro-geolocation.pages.dev/guide/expo-development-build)\n- [DevTools Plugin Guide](https://react-native-nitro-geolocation.pages.dev/guide/devtools)\n- [Why Nitro Module?](https://react-native-nitro-geolocation.pages.dev/guide/why-nitro-module)\n- [Benchmark Results](https://react-native-nitro-geolocation.pages.dev/guide/benchmark)\n\n---\n\n## License\n\nMIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjingjing2222%2Freact-native-nitro-geolocation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjingjing2222%2Freact-native-nitro-geolocation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjingjing2222%2Freact-native-nitro-geolocation/lists"}