views:

147

answers:

2

Every time I switch Xcode between debugging on my iPhone and running in the simulator it resets the simulated device. I want to run the simulator as an iPhone device, but it keeps changing back to iPad. Does anyone know how to set the configuration so that the simulator defaults to an iPhone device?

I can switch the hardware to iPhone inside the Simulator, but when I go back to Xcode and run a "Build Debug" it reopens the app inside an iPad. The only way I can get it to switch is by using the Overview menu in Xcode, the choices I see are iPad Simulator 3.2 and iPhone Simulator 4.0

And when I switch between device and simulator then it always goes back to iPad.

A: 

In the iPhone Simulator, go to Hardware>Device, and select "iPhone". Whatever you choose there is automatically saved.

pop850
When I do that Xcode is still overriding my choice.
nimblegorilla
A: 

What is the Base SDK set to in your project (General tab)? If it's not 4.0 then I think it may assume you are writing an iPad app.

If you set it to 3.2 wanting to support iOS 3.x, you need to set the base SDK to 4.0, then go into project build settings tab and change the OS Deployment target to 3.1 (or whatever the earliest version is you want to support).

Kendall Helmstetter Gelner
Thanks. That worked.
nimblegorilla