Monotouch launches wrong debugger hardware - iphone

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.

Related

How can I test my iPhone app on earlier than SDK 3.0 simulator, make sure it work?

I wrote iPhone application. Very simple! It use Cocos2D only, and all other features is very basic, no accelerometer, no camera, nothing. Just buttons and sounds.
I think every iPhone can run this app (there is no limits on Cocos2D right?), but my XCode only let me use 3.0 and upwards. I want to confirm 1 thing and ask one thing:
If I put "iPhone OS 2.0" in my iPhone OS Deployment Target in XCode, but my "Active SDK" in XCode still says 3.0, if I compile using this and submit to App Store, when it goes up, people who use 2.0 can still download and use the game yes?
Is there way I can test in a 2.0 simulator to make sure it works? My XCode only have 3.0 and higher simulation.
Set your Deployment Target for iPhone OS 2.0 and Base SDK for whatever version of the SDK you have (3.0, 3.1.2, 3.1.3, 3.2, etc.). Active SDK is just a compile-time override of the Base SDK. You should set your Base SDK to the latest STABLE version of the SDK and the Deployment to the oldest device you intend to support.
If you open up the iPhone Simulator and select from the menu bar Hardware > Version, you should see an option for SDK version 2.x. If you don't see this, you don't have any 2.0 SDK versions installed. 2.2.1 was included up to version 3.1.3, but you might not see it in the Simulator. You'll have to find an older version of the SDK to install. They can be found online by Googling. Don't have a link off-hand, but shouldn't be hard.
Edit
This is out-of-date for the newest version of Xcode (currently 3.2.5).

iPhone/iPad universal build problem with firmware version

I was doing a project as Universal binary for iPhone/iPad. I created the iPhone app side
and I was doing to complete the iPad too. I noticed one thing, on iPad classes I use the UIPopoverController class, means that when I build now for 3.2 in the Simulator, it runs te iPad one and it works fine, BUT if I want to see the iPhone version app, means 3.1.3, It give me an error of framework missing in the iPad classes.
I have no idea how to solve this problem because I cannot anymore see the iPhone version of the app and make changes. I can only remove all the iPad classes and after reimport again.
thanks guys!
With the 3.2 SDK the Simulator will only run as an iPad.
If you want to test your iPhone side, you will have to wrap the 3.2 specific code in preprocessor conditions to make it compile with 3.1.3.
If you have a device, you should be able to compile both the iPad and the iPhone version using the 3.2 SDK by setting the "Deployment Target" setting in your target's build settings.
Set it to the lowest version of iPhone OS you're willing to support, for example, 3.1.3 and compile using 3.2. You will also need to "weak link" against any new 3.2 frameworks, such as Core Text.
Finally, if you're not already, you should be using runtime checks to make sure your iPhone version doesn't try to make use of any 3.2 features, such as popovers.
This way, you won't have to remove your popover references and you should be able to compile. However, as I said, this will only be useful if you have a physical device to test with.
If you want to use the simulator, you'll have to follow the preprocessor conditions method.
You can only build with 3.2 Base SDK and iPhone OS Deployment Target 3.1.3 (or earlier). When you do this, the simulator will only run as 3.2/iPad. That's just how it is.
You will therefore need to debug on an actual device for iPhone testing.

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!

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

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

How can I develop production iPhone apps and iPad apps on the same machine?

It seems that in the future, we can just use the non-beta iPhone SDK to develop for both at once.
But for now, the only way to develop for iPad seems to be to use the SDK 3.2 beta. However, if I install that, Apple clearly states I should not submit apps to the app store with it.
I'm an independent, one-machine developer. Is there a way I can continue to upgrade my existing iPhone apps while still developing for iPad?
The Best way to do this is to install the 3.2 SDK beta in a location other than '/Developer'. On the 'Custom Install on Macintosh HD', select 'Other' from the Popup button, and point the installation to somewhere like: '/Developer-Beta'.
You can then run Xcode from /Developer/Applications for your iPhone apps, and Xcode from /Developer-Beta/Applications for your iPad apps.
If I'm reading the agreement correctly, the ban on submitting apps with the 3.2 beta applies only to the SDK, not the tools. If you set your app's base SDK to an SDK earlier than 3.2 (which it probably already is anyway), you can then build with the 3.1 and earlier SDKs by selecting them from the "Overview" menu in Xcode.
I've submitted updates to my iPhone apps built with the 3.0 SDK by the 3.2 beta tools, and they were accepted with no issue. As long as you aren't building on the actual new SDK, you should be fine.
EDIT: I don't work for Apple, I am not a lawyer, blah-blah. But it's worked for me, and the warning only specifies the "iPhone SDK 3.2". The Xcode tools aren't mentioned.
If you install 3.2 the Active SDK menu looks like
Xcode http://img.skitch.com/20100310-xkbqnbr6h4f2q55wk2wppjx3h2.preview.jpg
However, under Project settings you can change the SDK as follows:
Xcode http://img.skitch.com/20100310-xqkuracw73jb5y7uwtt7yurjs1.preview.jpg
So you can developed for any OS version using the same machine, etc.