Question

I would like to check on what device (iPod/iPhone/iPad) script is running. How can I do that ? I've looked through the web but I can't find anything usefull..

Was it helpful?

Solution

In bash try these commands:

sysctl hw.model
sysctl hw.machine

OTHER TIPS

In bash??

This is how I achieve this (in an iOS app written in Objective-C, the only way on a non-Jailbroken phone):

    NSLog(@"%@", [[UIDevice currentDevice] model]);

Check the UIDevice reference for what you can access.

Edit: on my Mac, I can run ioreg -l |grep -i "Device Model Name" and see my device model. perhaps there is a similar thing available in iOS.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top