I'm having a weird situation because I'm unable to run the simulator for iPhone below the versions of 4.0 and iPad 3.2. I have set IPHONEOS_DEPLOYMENT_TARGET = 3.1 but still unable to do that. I'm using Xcode 4.02, build 4A2002a. Any suggestions?
The latest version of Xcode will always only contain the latest version of the iPhone SDK. This means that if you upgraded your 3.0 install of Xcode to 4.0 (or have only ever downloaded Xcode post the iOS 4 release) you won't be able to run iOS 3 in the simulator.
You will either need to find a device that's still running iOS 3, or obtain an old version of Xcode that contains a 3.x SDK and install it alongside the current one. You can download these via Apple's developer site, some nice instructions can be found here: