Why do my xcode builds always go to the iPad simulator instead of the iPhone simulator? - iphone

I just installed the latest SDK from Apple so I can start learning iPhone / iPad app development. However, I'm having a stupid issue: all my builds get run in the iPad simulator instead of the iPhone simulator, and I have no idea how to change it.

For now, the iPhone Simulator 3.2 SDK is iPad-only. Test using the iPhone Simulator 3.1.2 SDK
edit: as of the upcoming 4.2 SDK, the iPhone and iPad versions of iOS have been unified under a single SDK.

On your build selector dropdown, (where you select device or simulator), there's now a new option that lets you choose the "Active Executible." Choose "iPhone Simulator."
alt text http://img.skitch.com/20100227-qyadm4ktn3abr3j44upkufjieh.jpg

Related

Compile iPhone only app to iPad device in Xcode

Is it possible to compile my iPhone app (which is developed for iPhone only) to my iPad with Xcode? I want to to this for presentation purposes, so I know it is not really compatible but I want to show it to a client and run it in 2x mode.
The iPad devices is attached in my provisioning profile.
When I try to compile it in Xcode it says:
Xcode could not run using the selected device
In Xcode I choose: "iOS device" (the other options in this menu are: iPad 5.1 simulator and iPhone 5.1 simulator).
In Xcode, select Organizer and in the Devices section, having the iPad plugged thru usb cable, select 'Use for development'.
This way allows you to run the app directly in the iPad form Xcode.
make sure you have added the device id in iOS provisioning profile you are using in the project

Why does XCode say that my iPhone app is only able to run on iPad?

I have a project in XCode with two targets. One target is for the iPhone only and the other is for iPad only.
The iPad target works as expected, but the iPhone target does not.
If I try to run it in the simulator, it starts the iPad simulator every time, but in iPhone compatibility mode with the 2x button.
If I try to run in on my iPhone 4 device, I get this message:
Can’t install application. The application at /Users/jacob/Documents/code/Projects/TVGuide/build/Debug-iphoneos/TVGuidePlus.app can only be installed on iPads.
This is XCode 3.2.6 and the iOS 4.3 SDK.
I have TARGETED_DEVICE_FAMILY defined at the target level and it looks like it is set correctly. The problem is the same for debug/release/...
have you selected the simulator as iphone?
most iphone apps are supposed to work on ipad too.
otherwise you may need to go to the project tab and go to project settings. there are some setting involving the choice of ios. i have not tried this since i havent recieved the error but i hope that it works.
Actually it turned out that I had Armv7 selected as architecture for my iPhone build. After changing that to armv6, I can now install and run the build on my device.

Monotouch launches wrong debugger hardware

I'm debugging a Monotouch app (created with mostly the default settings). When I ask it to debug in the simulator, it launches with the wrong hardware type -- iPad even though I'm developing for iPhone.
How do I switch this?
from
http://forums.monotouch.net/yaf_postst1185.aspx
someone answered:
In your project's options in MonoDevelop, go to "iPhone Build" and change your SDK version to something higher than 3.2. 3.2 is the version of iPad's SDK.
I think the detail is that the 3.2 SDK was never an iPhone SDK, it was an iPad SDK. Now things are unified with iOS as of 4.2.

How to test iPhone app on iOS 3.1.3?

I have an iPhone app which I need to test in an older version of iOS. In the iPhone Simulator, under the Hardware->Version menu, there are the options 3.2 and 4.0. Is it possible to test the app on an older version of the iOS? If so, how do I make it happen?
Unless you kept your old build of xcode (that has the 3.1.3 simulator) or you have a device running 3.1.3 you are more than likely out of luck.

How do I use the iPhone Simulator in 3.2 (not iPad Simulator)

I'm fixing my app to be a universal binary. Testing on the simulator seems to default to the iPad. For small corrections like checking orientations and small UI updates, the only way I can find to get the iPhone version is to plug in my iPhone and build and run on device.
Loading the debugger takes valuable time, when running on simulator is so much faster for this kind of work. Can I set the simulator to default to iPhone for this? Setting it to 3.1.3 doesn't work because of the 3.2 code I have in the binary for the iPad.
EDIT:
The Hardware -> Device, and ->Version menu choices in the simulator quits my app. When I relaunch, it goes back to the iPad. The app is not installed in the simulator
If you don't have the latest xcode, get it.
Set the project info to build for 3.2, but in the build drop down pick iPhone Simulator 4.0 and it will open in the iPhone simulator instead of the iPad simulator.
That is the dilemma: if you want to use OS 4 on the iPhone, you have to use iPhone SDK 4, which comes with XCode 3.2.3.
Previously I used iphone_sdk_3.1.3_with_xcode_3.2.1__snow_leopard__10m2003a, where the simulator was fine, but now after I update the iPhone to OS 4 (which is by iTunes), I cannot use the SDK 3.1.3 any more, and the simulator 3.2 which comes with SDK 4 actually does not work for iPhone at all!
Even when you specify the "iPhone OS Deployment Target" to "OS 3.1.3", and an iPhone-frame shows up in the iPad simulator, many functions are not responding at all.
Does Apple have an official answer to this dilemma?
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!