{"id":4627,"url":"https://github.com/mchinyakov/react-native-device-info","last_synced_at":"2025-08-04T01:32:46.584Z","repository":{"id":57336515,"uuid":"43809341","full_name":"mchinyakov/react-native-device-info","owner":"mchinyakov","description":"Device Information for React Native iOS and Android","archived":false,"fork":true,"pushed_at":"2015-10-07T12:07:13.000Z","size":106,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-20T06:42:13.798Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"react-native-device-info/react-native-device-info","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mchinyakov.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}},"created_at":"2015-10-07T10:43:26.000Z","updated_at":"2020-10-15T23:08:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mchinyakov/react-native-device-info","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mchinyakov/react-native-device-info","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mchinyakov%2Freact-native-device-info","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mchinyakov%2Freact-native-device-info/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mchinyakov%2Freact-native-device-info/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mchinyakov%2Freact-native-device-info/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mchinyakov","download_url":"https://codeload.github.com/mchinyakov/react-native-device-info/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mchinyakov%2Freact-native-device-info/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268636477,"owners_count":24282094,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"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":[],"created_at":"2024-01-05T20:17:18.358Z","updated_at":"2025-08-04T01:32:46.301Z","avatar_url":"https://github.com/mchinyakov.png","language":"Java","funding_links":[],"categories":["Components"],"sub_categories":["System"],"readme":"## react-native-device-info\n\nDevice Information for react-native\n\n## Installation\n\nFirst you need to install react-native-device-info:\n\n```javascript\nnpm install react-native-device-info --save\n```\n\n### Installation (iOS)\n\nIn XCode, in the project navigator, right click Libraries ➜ Add Files to [your project's name] Go to node_modules ➜ react-native-device-info and add the .xcodeproj file\n\nIn XCode, in the project navigator, select your project. Add the lib*.a from the deviceinfo project to your project's Build Phases ➜ Link Binary With Libraries Click .xcodeproj file you added before in the project navigator and go the Build Settings tab. Make sure 'All' is toggled on (instead of 'Basic'). Look for Header Search Paths and make sure it contains both $(SRCROOT)/../react-native/React and $(SRCROOT)/../../React - mark both as recursive.\n\nRun your project (Cmd+R)\n\n(Thanks to @brysgo for writing the instructions)\n\n### Installation (Android)\n\n* In `android/setting.gradle`\n\n```gradle\n...\ninclude ':RNDeviceInfo', ':app'\nproject(':RNDeviceInfo').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-device-info/android')\n```\n\n* In `android/app/build.gradle`\n\n```gradle\n...\ndependencies {\n    ...\n    compile project(':RNDeviceInfo')\n}\n```\n\n* register module (in MainActivity.java)\n\n```java\nimport com.learnium.RNDeviceInfo.*;  // \u003c--- import\n\npublic class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {\n  ......\n\n  @Override\n  protected void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n    mReactRootView = new ReactRootView(this);\n\n    mReactInstanceManager = ReactInstanceManager.builder()\n      .setApplication(getApplication())\n      .setBundleAssetName(\"index.android.bundle\")\n      .setJSMainModuleName(\"index.android\")\n      .addPackage(new MainReactPackage())\n      .addPackage(new RNDeviceInfo())              // \u003c------ add here\n      .setUseDeveloperSupport(BuildConfig.DEBUG)\n      .setInitialLifecycleState(LifecycleState.RESUMED)\n      .build();\n\n    mReactRootView.startReactApplication(mReactInstanceManager, \"ExampleRN\", null);\n\n    setContentView(mReactRootView);\n  }\n\n  ......\n\n}\n```\n\n(Thanks to @chirag04 for writing the instructions)\n\n## Example\n\n```js\nvar DeviceInfo = require('react-native-device-info');\n\nconsole.log(\"Device Unique ID\", DeviceInfo.getUniqueID());  // e.g. FCDBD8EF-62FC-4ECB-B2F5-92C9E79AC7F9\n\nconsole.log(\"Device Manufacturer\", DeviceInfo.getManufacturer());  // e.g. Apple\n\nconsole.log(\"Device Model\", DeviceInfo.getModel());  // e.g. iPhone\n\nconsole.log(\"Device Name\", DeviceInfo.getSystemName());  // e.g. iPhone OS\n\nconsole.log(\"Device Version\", DeviceInfo.getSystemVersion());  // e.g. 9.0\n\nconsole.log(\"Bundle Id\", DeviceInfo.getBundleId());  // e.g. com.learnium.mobile\n\nconsole.log(\"Build Number\", DeviceInfo.getBuildNumber());  // e.g. 89\n\nconsole.log(\"App Version\", DeviceInfo.getVersion());  // e.g. 1.1.0\n\nconsole.log(\"App Version (Readable)\", DeviceInfo.getReadableVersion());  // e.g. 1.1.0.89\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmchinyakov%2Freact-native-device-info","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmchinyakov%2Freact-native-device-info","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmchinyakov%2Freact-native-device-info/lists"}