UIDevice Extension now Detects iPhone 4 Hardware

If you’ve ever wanted to identify when your app is being run on a specific device iOS model, in order to limit or enable certain functionality, you’ll have noticed that Apple’s doesn’t provide a way to return the exact version number in its model method to the UIDevice class. Erica Sadun’s UIDevice Extension adds a category to your UIDevice and provide access to a more precise hardware model string. Today’s new release includes a way to identify not only the iPhone 4, but also whether it’s running on AT&T or other carriers.

Other hardware specs like the CPU and bus frequency and total or free disk can also be queried. (via Dr. Touch on Twitter).

Update: As Will Strafach points out, it also identifies an unreleased ‘iPod Touch 4G’ and something called the ‘iTV 1G’.

Share this post:
  • Twitter
  • HackerNews
  • Facebook
  • Digg
  • StumbleUpon
  • del.icio.us
  • Google Buzz
This entry was posted in Code and tagged intermediate. Bookmark the permalink.

One Response to UIDevice Extension now Detects iPhone 4 Hardware

  1. Pingback: cdevwill (Will Strafach)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>