🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ios-devices

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ios-devices

A JSON object mapping iOS device model codes (e.g. iPad2,1) to their respective marketing names (e.g. iPad 2).

1.3.0
latest
Source
npm
Version published
Weekly downloads
5
400%
Maintainers
1
Weekly downloads
 
Created
Source

node-ios-devices

A JSON object mapping iOS device model codes (e.g. iPad2,1) to their respectively marketing names (e.g. iPad 2).

The data is mainly sourced from here.

The following C code prints the device model code:

#include <sys/sysctl.h>
size_t size;
sysctlbyname("hw.machine", NULL, &size, NULL, 0);
char result[size];
sysctlbyname("hw.machine", result, &size, NULL, 0);
printf("%s\n", result);

// result is a typical C string that can be passed to [NSString stringWithUTF8String:result];

Thanks to vijaymadhavan for adding more detail to each row. (See pull request #2)

License

This is released into the public domain under the Unlicense. This information is publicly available.

Keywords

ios

FAQs

Package last updated on 11 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts