{"id":21922681,"url":"https://github.com/remscodes/react-native-config-info","last_synced_at":"2025-04-19T15:17:40.476Z","repository":{"id":260281218,"uuid":"880238574","full_name":"remscodes/react-native-config-info","owner":"remscodes","description":"🔎 Read configuration values from Info.plist (iOS) or from resources strings.xml (Android)","archived":false,"fork":false,"pushed_at":"2025-03-27T10:40:51.000Z","size":217,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T11:02:16.287Z","etag":null,"topics":["android","configuration","ios","javascript","kotlin","objective-c","react-native"],"latest_commit_sha":null,"homepage":"https://npm.im/react-native-config-info","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/remscodes.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":"2024-10-29T11:23:53.000Z","updated_at":"2025-03-27T10:40:52.000Z","dependencies_parsed_at":"2025-03-22T22:25:47.792Z","dependency_job_id":"ec7a80a5-d272-4355-9f6b-adc5bb75ea8b","html_url":"https://github.com/remscodes/react-native-config-info","commit_stats":null,"previous_names":["remscodes/react-native-config-info"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remscodes%2Freact-native-config-info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remscodes%2Freact-native-config-info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remscodes%2Freact-native-config-info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remscodes%2Freact-native-config-info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remscodes","download_url":"https://codeload.github.com/remscodes/react-native-config-info/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249724860,"owners_count":21316123,"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":["android","configuration","ios","javascript","kotlin","objective-c","react-native"],"created_at":"2024-11-28T21:05:57.488Z","updated_at":"2025-04-19T15:17:40.464Z","avatar_url":"https://github.com/remscodes.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003eReact Native Config Info\u003c/h1\u003e\n    \u003cp\u003eRead configuration values from Info.plist (iOS) or from resources strings.xml (Android)\u003c/p\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![github ci](https://img.shields.io/github/actions/workflow/status/remscodes/react-native-config-info/npm-ci.yml.svg?\u0026logo=github\u0026label=CI\u0026style=for-the-badge)](https://github.com/remscodes/react-native-config-info/actions/workflows/npm-ci.yml)\n[![npm version](https://img.shields.io/npm/v/react-native-config-info.svg?\u0026style=for-the-badge\u0026logo=npm)](https://www.npmjs.org/package/react-native-config-info)\n[![bundle size](https://img.shields.io/bundlephobia/minzip/react-native-config-info.svg?style=for-the-badge)](https://bundlephobia.com/package/react-native-config-info)\n[![license](https://img.shields.io/github/license/remscodes/react-native-config-info.svg?style=for-the-badge)](LICENSE)\n\n\u003c/div\u003e\n\n## Installation\n\n```shell\nnpm install react-native-config-info\ncd ios \u0026\u0026 pod install\n```\n\n## Prerequisite\n\nAdd your values into your Info.plist (iOS) or strings.xml (Android).\n\n### iOS\n\n_ios/\\[project\\]/Info.plist_\n\n```text\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003c!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"\u003e\n\u003cplist version=\"1.0\"\u003e\n\u003cdict\u003e\n    \u003ckey\u003eBackendUrl\u003c/key\u003e\n    \u003cstring\u003ehttps://api.example.com\u003c/string\u003e\n\u003c/dict\u003e\n\u003c/plist\u003e\n```\n\n### Android\n\n_android/app/src/main/res/values/strings.xml_\n\n[//]: # (@formatter:off)\n```xml\n\u003cresources\u003e\n    \u003cstring name=\"BackendUrl\"\u003ehttps://api.example.com\u003c/string\u003e\n\u003c/resources\u003e\n```\n[//]: # (@formatter:on)\n\n## Usage\n\n### Asynchronous getters\n\nGet your values.\n\n```ts\nimport ConfigInfo from 'react-native-config-info';\n\nasync function main() {\n  await ConfigInfo.get('BackendUrl'); // https://api.example.com\n  await ConfigInfo.getOrThrow('BackendUrl'); // https://api.example.com\n\n  await ConfigInfo.get('UnknownKey'); // null\n  await ConfigInfo.getOrThrow('UnknownKey'); // [RNConfigInfoException: 'UnknownKey' value is missing from ….]\n}\n```\n\n### Synchronous getters\n\nGet your values synchronously.\n\nAs said in the official [documentation](https://reactnative.dev/docs/0.70/native-modules-ios#synchronous-methods),\nsynchronous methods are not recommended.\n\nOnly use them if you have no other option.\n\n```ts\nimport ConfigInfo from 'react-native-config-info';\n\nConfigInfo.getSync('BackendUrl'); // https://api.example.com\nConfigInfo.getSyncOrThrow('BackendUrl'); // https://api.example.com\n\nConfigInfo.getSync('UnknownKey'); // null\nConfigInfo.getSyncOrThrow('UnknownKey'); // [RNConfigInfoException: 'UnknownKey' value is missing from ….]\n```\n\n## License\n\n[MIT](LICENSE) © Rémy Abitbol.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremscodes%2Freact-native-config-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremscodes%2Freact-native-config-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremscodes%2Freact-native-config-info/lists"}