Вопрос

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

Это было полезно?

Решение

In bash try these commands:

sysctl hw.model
sysctl hw.machine

Другие советы

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top