I\'ve downloaded the final version (and never installed any beta versions before) of xcode 3.2.3 with sdk 4, and now I can\'t seem to find a way to compile my app for a 3.1.3 iO
To expand on Jason Coco's answer: If you go to the Project Info screen and click Build, you can choose what Base SDK to use (4.0) and then scroll down to iPhone OS Deployment Target version and set it to 3.1.3 or whatever. However, you also have to go to the Targets section under Groups & Files (red bullseye) select your target and get the Info build page, and set your iPhone OS Deployment Target there too.
Once that's done, you should be able to test it with a device that's still running 3.0 or whatever you selected.