{"id":22192541,"url":"https://github.com/3sidedcube/react-native-location-permissions","last_synced_at":"2025-03-24T20:45:43.648Z","repository":{"id":79436536,"uuid":"85582481","full_name":"3sidedcube/react-native-location-permissions","owner":"3sidedcube","description":"A React Native library for adding a listener to location permission changes on iOS","archived":false,"fork":false,"pushed_at":"2019-12-11T11:03:37.000Z","size":9,"stargazers_count":0,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-30T01:22:36.674Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","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/3sidedcube.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2017-03-20T13:51:18.000Z","updated_at":"2018-07-25T08:27:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"46b2c78b-cdb5-4d9c-a380-683c3897e515","html_url":"https://github.com/3sidedcube/react-native-location-permissions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3sidedcube%2Freact-native-location-permissions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3sidedcube%2Freact-native-location-permissions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3sidedcube%2Freact-native-location-permissions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3sidedcube%2Freact-native-location-permissions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3sidedcube","download_url":"https://codeload.github.com/3sidedcube/react-native-location-permissions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245351757,"owners_count":20601090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-12-02T12:25:59.305Z","updated_at":"2025-03-24T20:45:43.620Z","avatar_url":"https://github.com/3sidedcube.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-native-location-permissions\n\nA simple and easy to use library for listening to location permission changes. This only works for iOS.\n\n## Getting started\n\n```\n$ npm install react-native-location-permissions --save\n$ react-native link\n```\n\n## Usage\n\n## API Documentation\n\n#### `locationPermissions#onPermissionsChange(callback)`\n- `callback` `Function` The callback to invoke when the user's location permissions change\n\nRegisters a callback to be invoked whenever the user's location permissions change. The callback is invoked with an `event` argument which contains a string representation of the current permission under the `status` key.\n\nThis method returns a function which you should invoke when you want to unregister the callback, for example, in your app's `componentWillUnmount`.\n\n#### Example\n```js\nconst off = locationPermissions.onPermissionsChange((event) =\u003e {\n\tconst { status } = event;\n\n\tif (status === locationPermissions.notDetermined) {\n\t\tconsole.log(`Location permissions not yet determined`);\n\t}\n\telse if (status === locationPermissions.authorizedAlways || status === locationPermissions.authorizedWhenInUse) {\n\t\tconsole.log(`Location permissions granted`);\n\t} else {\n\t\tconsole.log(`Location permissions denied`);\n\t}\n});\n\n// Whenever you want to unregister.\noff();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3sidedcube%2Freact-native-location-permissions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3sidedcube%2Freact-native-location-permissions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3sidedcube%2Freact-native-location-permissions/lists"}