{"id":4621,"url":"https://github.com/fixt/react-native-device-specs","last_synced_at":"2025-09-21T06:55:23.356Z","repository":{"id":57336543,"uuid":"43458767","full_name":"fixt/react-native-device-specs","owner":"fixt","description":"Detects device type on both android and ios","archived":false,"fork":false,"pushed_at":"2016-06-22T18:54:09.000Z","size":42,"stargazers_count":11,"open_issues_count":2,"forks_count":6,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-09-07T08:03:10.341Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fixt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-30T20:58:09.000Z","updated_at":"2017-05-10T18:32:01.000Z","dependencies_parsed_at":"2022-09-03T08:00:22.466Z","dependency_job_id":null,"html_url":"https://github.com/fixt/react-native-device-specs","commit_stats":null,"previous_names":["peachmeco/react-native-device-specs","peachmeco/react-native-detect-device"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/fixt/react-native-device-specs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixt%2Freact-native-device-specs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixt%2Freact-native-device-specs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixt%2Freact-native-device-specs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixt%2Freact-native-device-specs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fixt","download_url":"https://codeload.github.com/fixt/react-native-device-specs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fixt%2Freact-native-device-specs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276078006,"owners_count":25581314,"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-09-20T02:00:10.207Z","response_time":63,"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.192Z","updated_at":"2025-09-21T06:55:23.314Z","avatar_url":"https://github.com/fixt.png","language":"Java","funding_links":[],"categories":["Components"],"sub_categories":["System"],"readme":"# React Native Device Specs\n\nRNDeviceSpecs detects the specifications of the device it is running on.  Requiring or importing the module will give you an object with properties that describe the user's device.\n\n## Add it to your project\n### Install\n`npm install react-native-device-specs --save`\n### iOS\nOpen your project in XCode, right click on `Libraries`, click `Add files to (Your Project Name)`, and select `RNDeviceSpecs.xcodeproj`\n\nAdd `libRNDeviceSpecs.a` to `Build Phases` --\u003e `Link Binary With Libraries`\n### Android\nIn `android/settings.gradle`\nbelow `include ':app'`\nadd:\n```\n...\ninclude ':react-native-device-specs'\nproject(':react-native-device-specs').projectDir = new File(settingsDir, '../node_modules/react-native-device-specs')\n```\n\nIn `android/app/build.gradle`\n```\ndependencies {\n    ...\n    compile project(':react-native-device-specs')\n}\n```\n\nIn `android/app/src/main/java/com/YourProject/MainActivity.java`\nadd:\n```\nimport com.joinpeach.react.device.specs.*; // \u003c--- add this\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 RNDeviceSpecsModule())           // \u003c- and add this\n                .setUseDeveloperSupport(BuildConfig.DEBUG)\n                .setInitialLifecycleState(LifecycleState.RESUMED)\n                .build();\n\n        mReactRootView.startReactApplication(mReactInstanceManager, \"YourProject\", null);\n\n        setContentView(mReactRootView);\n    }\n}\n```\n### Use it!\nUse `import specs from 'react-native-device-specs'` or `var specs = require('react-native-device-specs')` in your project!\n\n## Properties\n- `platform`: The platform code.\n- `storageSize`: The quoted storage size (GB) given by Apple (Ex: 32, 64, 128)\n- `diskSpace`: The actual size of the disk.\n- `carrier`: The carrier of device or `'No Carrier'` for Simulators or Devices without a carrier.\n\n\n## Contributing\nFeel free to submit a pull request with feature suggestions or device updates.  Please maintain a consistent syntax for new devices (See lib/iosModels.js for examples)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffixt%2Freact-native-device-specs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffixt%2Freact-native-device-specs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffixt%2Freact-native-device-specs/lists"}