Setting Xcode's target to iPhone NOT iPad - iphone

I just upgraded to iPhone SDK 3.2 Beta 4. Since doing so, I have not been able to get the app to launch in the iPhone simulator - it keeps launching in the iPad simulator. I have tried option-clicking the drop-down menu in the top left-corner of Xcode and setting 'Active Executable' to iPhone simulator 3.1.3 but it keeps going back to iPad simulator instead.
What gives? I have no interest in my app running on the iPad and I don't want to test it in the 2X mode in the simulator.
Thanks,

You can't really launch an iPhone app in 3.2.x - sometimes it will pop up - but basically right now it is only for iPad development.

Update for release version of Simulator.
First of all, the title of this question doesn't match the description: Xcode target isn't the same as the simulator hardware device.
If you are writing an app targeting 3.2, it can run on both iPad (using OS 3.2) and lower OS versions on the iPhone. You do this by setting the Base SDK to iPhone Device 3.2, the Targeted Device Family to iPhone/iPad, and the iPhone OS Deployment Target to 3.1 (lower than 3.2).
The iPhone simulator has a menu option for Hardware->Device, which can be set to iPhone or iPad. However, you can only run a 3.2 SDK target in iPad mode, and a Universal app that supports iPad can only use the 3.2 SDK to build.
You can of course set the simulator to iPhone mode and launch your app from Springboard, but that will lose the debugger connection. Switching mode during installation of your app will cause it to crash.
So the short answer is still the same: you can't run a Universal iPad app in the iPhone mode simulator while debugging.

Upper-left corner of the IDE find a dropdown list of Simulator versions - flipped to 3.2 - try to put it back to 3.1.3
and relaunch your app.

This was driving me nuts too, but the answer is right here:
http://quatermain.tumblr.com/post/517122761/running-universal-ipad-iphone-apps-in-the-simulator
In short, tell Xcode to Build for the 3.2 SDK, then switch the build menu to the 3.1 SDK and tell Xcode to Run the app. Presto, the app starts in the iPhone simulator!

From Apple's documentation: "iPhone OS 3.2 does not support iPhone and iPod touch devices. It runs only on iPad." There's no way to target 3.2 for iPhone, so there's no Simulator. Ergo, you'll have to wait for iOS 4. Fortunately, that's only 4 days away now... of course it won't support the first generation of iPhone devices, but for all other iPhone users it's a free upgrade. Not sure about iPod Touches.

You should be able to change your target platform in your Project Settings.

Changing the target platform and device makes no difference. It always launches the iPad simulator.
If you switch the simulator to iPhone mode, the app just disappears.
This dev environment is a mess.

Short answer: You can change the hardware setting in the simulator. Hardware->Device

Go to Project
Set Active Executable
There are 2 options: Ipad Simulator 3.2 or Iphone Simulator 4.0.
If you choose the Iphone simulator, then it will launch Iphone simulator.
If you choose the Ipad simulator, then it will launch Ipad simulator.

I finally solved this problem myself.
First, install new version of xCode, which is xCode 4.
Then set project scheme to iphone simulator and run app in xCode several times.
And re-install xCode 3 and the problem will be gone away!

Related

iPhone 6.1 Simulator

I am just starting to learn programming for the iPhone and I had a very general question.
I was wondering why is it that when I run my program in xcode, even though I am programming for iPhone 5, when I run the "iPhone 6.1 Simulator" instead of a iPhone 5 Simulator and iPhone 4 pops up?
I am on Mac OS X - 10.7.5
And Xcode version 4.6
Could it be because the apple id I used to download xcode with only has an iPhone 4 and not a 5?
Thanks for the help.
To change your simulator device to other screen resolutions go to Simulator - Device - Retina 4 inch (for iPhone 5) and Retina 3.5 inch for iPhone 4/4S. Use iPhone for iPhone 3GS resolution.
In the Window menu you can change the scale to fit your Mac's screen resolution. (I use 75% for iPhone Retina 3.5 inch).
I also suggest you download iOS 5.1 Simulator if you want to deploy apps for iOS 5.1 and up - it comes really handy and it actually does have some differences from iOS 6.
Choosing "iPhone 6.1 Simulator" is telling Xcode that you want to use the currently selected iPhone simulator with iOS 6.1.
To select the specific iPhone simulator you need to click on the Hardware then Device menu in the simulator.
Your Apple Id and your registered devices have nothing to do with this.

iPhone Simulator: start iPad by default?

Can I somehow force a specific hardware device when running my universal app? Whenever I rebuild and test, iPhone 3 fires up and I have to switch over to iPad and rotate the device.
Annoying.
Project > Edit Project Settings > Targeted Device Family > iPad
I finally solved this problem myself.
First, install new version of xCode, which is xCode 4.
Then set project scheme to iphone simulator and run app in xCode several times.
And re-install xCode 3 and the problem will be gone away!

XCode 3.2.5, iOS 4.2 - Why does the iPad Simulator launch instead of the iPhone Simulator?

I have an app that is iPhone only (Targeted Device Family == iPhone), Base SDK 4.2, iOS Deployment Target 4.0.
Once in a while, but pretty often, the target switch to iPad Simulator. Is this a bug ? I shouldn't even have this option in the target selection dropdown...
In my eyes is the best way to work arround is to set up the Device in the Simulator under Devices. There you can also choose between iPhone with or without Retina Display.
Once Open, the Simulator-Device will stay.
cheers
To Thomas : I thinkg that you chosed 'iPhone only' on the wrong configuration of the target (ex : 'distribution' instead of 'debug'). If you choose 'iPhone' for the debug configuration, your app should never lanch in the iPad simulator.
To kkend0g187 : choose 'iPhone' for the "targeted device family" in the debug configuration of the target. Otherwise, you will come back to the wrong device not just when you run but when you clean the targets before running.

how can I run a iPad project on a iPhone or touch

I build a iPad project,i want to run the project on iPhone with auto-resize and it's run successful on iPhone 4.1 simulator,but it's always alert 'can only installed on ipads' when i run it with my iPhone,how can I run a iPad project on a iPhone or touch,what can i do?
You should set Targeted Device Family to iPhone/iPad in your project settings.Hope it works for you..
It doesnt make sense to install an iPad app in iPhone at all.
iPad has its own UI controls.You can install iPhone apps to iPad is just because iPad supports all the controls that iPhone has.
Reverse is not possible.

No iPad simulator in Xcode 3.2 beta 5

I installed Xcode 3.2 beta 5 and I could not find iPad Simulator. Where do I find it?
You are looking for the program iPhone Simulator.
If not, you can test your website in Safari on iPad using the iPhone Simulator (Hardware -> Device -> iPad).
Above is from Technical Note TN2262
If you can't find it via searchlight, than try looking in /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator
After you install the SDK successfully, Run Xcode and create a new project. Select iPad for product.
When you create an iPhone project for iPhone OS 3.2, you will see that every time you Build and Run it, it appears in the iPad simulator instead of the iPhone simulato
There is not much too see when you run the simulator without a project
Go to spotlight and search iOS Simulator. You run that and up pops an iPhone simulator, go to Hardware > Device and change it to an iPad
The iOS Simulator is in Mac HD > Developer > Platforms > iPhoneSimulator.platform > Developer > Applications > (here)
Nicely squirrelled away
Try creating an iPad project and ask to launch it in the simulator.
When running, go to the dock, right click on the icon and select "options".
In the "Options" menu is "Reveal in Finder", which will show you where the simulator currently lives.
Also be aware that the iPhone and iPad simulator are the same application, in the menu for the iPhone Simulator (the actual name of the app) you can select which device you want to simulate (though XCode will automatically switch this for you when you run in debug).
Perhaps this pertains,
From Xcode release notes found under the download selection:
Known Issues in Xcode 5 developer preview
Simulator
There is no iPad simulator support in this seed.