{"id":4579,"url":"https://github.com/GertjanReynaert/react-native-device","last_synced_at":"2025-08-04T01:32:38.488Z","repository":{"id":30397798,"uuid":"33950549","full_name":"GertjanReynaert/react-native-device","owner":"GertjanReynaert","description":"A UIDevice class wrapper for React Native","archived":false,"fork":false,"pushed_at":"2017-08-10T16:26:00.000Z","size":71,"stargazers_count":179,"open_issues_count":7,"forks_count":34,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-20T06:04:11.664Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/GertjanReynaert.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-04-14T18:50:59.000Z","updated_at":"2024-10-01T15:37:48.000Z","dependencies_parsed_at":"2022-09-03T08:01:28.215Z","dependency_job_id":null,"html_url":"https://github.com/GertjanReynaert/react-native-device","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GertjanReynaert/react-native-device","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GertjanReynaert%2Freact-native-device","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GertjanReynaert%2Freact-native-device/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GertjanReynaert%2Freact-native-device/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GertjanReynaert%2Freact-native-device/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GertjanReynaert","download_url":"https://codeload.github.com/GertjanReynaert/react-native-device/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GertjanReynaert%2Freact-native-device/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268636420,"owners_count":24282089,"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:16.929Z","updated_at":"2025-08-04T01:32:38.212Z","avatar_url":"https://github.com/GertjanReynaert.png","language":"Objective-C","funding_links":[],"categories":["Components","Objective-C"],"sub_categories":["System"],"readme":"# React Native Device [deprecated]\n\nThis project is no longer maintained. You can still use it as is, but bugs will no longer be fixed, features will no longer be implemented. An alternative to this package might be [react-native-device-info](https://github.com/rebeccahughes/react-native-device-info)\n\n![NPM Stats](https://nodei.co/npm/react-native-device.png?downloads=true)\n\nA wrapper for the native [iOS UIDevice](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIDevice_Class/index.html#//apple_ref/occ/cl/UIDevice) \u0026 [Android Build](http://developer.android.com/reference/android/os/Build.html) class allowing you to access device properties and screen dimensions. **Currently only for React Native iOS, [Android support](https://github.com/GertjanReynaert/react-native-device/issues/16) in progress.**\n\n## Installation (iOS)\n\nFirst install the package to your project from NPM...\n\n```\nnpm install react-native-device --save\n```\n\nThen within the package folder just add both the `.h` and `.m` classes to your project...\n\n\u003cimg src=\"http://i.imgur.com/GZeVPPd.png\" width=\"400\"\u003e\n\n## Methods\n\n```javascript\nDevice.isIpad()\n```\n\nThe device model is of type iPad\n\n```javascript\nDevice.isIphone()\n```\n\nThe device model is of type iPhone\n\n## Properties\n\n```javascript\nDevice.model\n```\n\nThe device model, such as `iPhone` or `iPad`\n\n```javascript\nDevice.deviceName\n```\n\nThe device name, such as `John Smith's iPhone`\n\n```javascript\nDevice.systemName\n```\n\nThe device OS name, such as `iPhone OS`\n\n```javascript\nDevice.systemVersion\n```\n\nThe device OS version, such as `8.4`\n```javascript\nDevice.deviceVersion\n```\n\nThe specific device version, such as `iPhone 4S` or `iPhone 6` - [All model options](https://gist.github.com/kkjdaniel/652cf598ae0ac298a50b)\n\n## Example\n\n```javascript\n'use strict';\n\nvar Device = require('react-native-device');\n\nvar ExampleApp = React.createClass({\n  render: function() {\n    if (Device.isIpad()) {\n      // return iPad layout\n    } else {\n      // return iPhone layout\n    }\n  }\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGertjanReynaert%2Freact-native-device","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGertjanReynaert%2Freact-native-device","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGertjanReynaert%2Freact-native-device/lists"}