values of uname() fields for iPhone.

Hi,

Where can I find the possible values of the uname() structure for iPhone? I need to determine if my app is running on 3G/3GS/4G - along with the O/S versions.

Thx and regards, Sam.

iMac, Mac OS X (10.5.5)

Posted on Jul 5, 2010 5:51 PM

Reply
1 reply

Jul 6, 2010 1:24 AM in response to Shnaps

Hi Sam -

I think you're asking about the fields in +struct utsname+ (#include <sys/utsname.h>) which is loaded by the uname() BSD library function. For the machine info, see the reply by Will Harris in this SO thread: [Detect the specific iPhone/iPod touch model|http://stackoverflow.com/questions/1108859/detect-the-specific-iphone-ipo d-touch-model]. That thread predates 4G, and since I don't have a 4G myself, I can't give you the exact string in that case.

As to the O/S info, you'll find utsname.h in /usr/include/sys. I don't know where to find a list of all possible values, but all the fields are C strings, so it shouldn't be difficult to interpret them. If you go to the trouble of compiling a more or less complete list, please post it for us, ok?

\- Ray

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

values of uname() fields for iPhone.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.