Lifestyle, hobbies, work, rage…
Archive for August, 2010
Detecting hardware type (MonoTouch)
5The MonoTouch wiki lists a snippet used to detect which hardware is being used at runtime – but it hasn’t been updated since iPhone 3G. This means no iPhone 3GS, iPhone 4 or iPad.
Code after the break; Kudos to the MonoTouch team!
UPDATE: Added iPhoneSimulator, iPhone4Simulator and iPadSimulator.
ANOTHER UPDATE: Fixed some identifiers. Sorry about that.