How to check what device are You running in bash
-
19-06-2021 - |
Вопрос
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.
Не связан с StackOverflow