Detecting an iOS Device?

I was wondering how I can detect an iOS Device's iOS version & name (Ex. Connected: iPhone Running iOS 5.1.1) and display it on a console window. Do I have to use an external library, or can it be done using standard libs?
I believe you use the ifdef directive to check for a pre-defined macro.

Here's a similar question from stack overflow:
http://stackoverflow.com/questions/7836967/how-to-define-preprocessor-macro-to-check-ios-version

Other OS macros can be found from this list:
http://sourceforge.net/p/predef/wiki/OperatingSystems/
I think he is asking about dectecting device "plug and play" (example: you connect an external HD with USB)

In that case all depends of the OS you are using (you must check for libraries provided by your OS). I don't know if exists a multi-platform library to perform such action in a platform-independant way. It a thing too advanced for me.
Topic archived. No new replies allowed.