Apple advises using the following code to detect whether running on an iPad or iPhone/iPod Touch:
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
This seems to completely defeat the purpose of such a function. They can only be compiled and run on iPhone OS 3.2 (iPhone OS 3.2 can only be run on iPad). So if you can use UI_USER_INTERFACE_IDIOM(), the result will always be to indicate an iPad.
This is completely incorrect. It can be compiled on Base SDK of 3.2, but it can be run on any OS, if you set the deployment target appropriately.