-1

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..

Andrzej Florek
  • 335
  • 1
  • 3
  • 8

2 Answers2

2

In bash try these commands:

sysctl hw.model
sysctl hw.machine
AW101
  • 1,620
  • 14
  • 15
0

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.

Chris Trahey
  • 18,202
  • 1
  • 42
  • 55