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:
size_t size;char result[size]; // 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.