views:

210

answers:

4

Hi, i have xcode 3.1.3 and xcode 3.2.1 installed

For sure now I use 3.2.1 with Sdk 4 to develop new apps. But what if I like to test a App compiled with sdk 4 on a simulated iphone that would just have 3.0??

As BaseSDk i use 4.0 and as target 3.0

In xcode 3.1.3 i could select a simulator down to 2.x but with sdk 4.0 i only have the option 4.0 iphone or 3.2 ipad

Example> i know iAd is not supported before 4.0 so I set the framework to weak. But just to be sure all works fine I really would like to test my app in a simulator that simulates an iphone with 3.0

thx chris

A: 

inside the iphone sdk dmg file, there should be a folder called packages. in it, you'll find packages like iPhoneSDK3_0 and iPhoneSimulator3_0. Install them to be able to use them in xcode.

jmont
That's not enough. And he already has required files in the separate XCode installation. The problem is not really with making Simulator3.0 build using newer XCode. You can workaround that. But newer XCode will not be able to run that successfully in its simulator.
Piotr Kalinowski
this answer apparently doesn't apply w the xcode 3.2.3 installer. try finding a 3.1.2 dmg. Mine's called:"iphone_sdk_3.1.2_with_xcode_3.2.1__snow_leopard__10m2003"but really you should move away from 3.0...
jmont
Are you sure? I think I've done it before. If he has all the files installed, then he can go to project > edit project settings > base SDK and change that to whatever he pleases (I have xcode 3.2.3 and the simulator sdks include back to 2.0). Then just compile and run normally.
jmont
You can compile, and run on devices, but with XCode 3.2.3 you "always" use Base SDK version, and despite various attempts I could not make executable compiled with 3.0 iPhoneSimulator SDK to be executed from within new XCode. It gave some runtime errors. (Or simulator did? I can't remember precisely now.)
Piotr Kalinowski
A: 

Correct me if I'm wrong, but I think a device with 3.0 installed can't even run apps compiled with 3.2 or 4.0. Furthermore, Apple now only accepts iPhone apps (including updates of existing apps) linked against the 4.0 libraries, which won't run on OS version 3.0 devices.

So why do you want to test your app on a 3.0 device?

bouma
Incorrect. If you set Deployment target property to OS 3.0, it will run on 3.0 devices despite being compiled and linked with 4.0 for example. Obviously, if you use 4.0 API, that part will not work on those devices, but you can guard against that using `respondsToSelector`.
Piotr Kalinowski
I stand corrected, thank you for the info.
bouma
+2  A: 

The new simulator does not seem to be able to run the old simulator OSs (3.2 being the oldest it'll run). I tried moving them over from old SDK installs and several variations and "no go".

You can check that you aren't using methods defined in the new SDK, when you set the base SDK to 4.0 but set the Deployment to to 3.1.3, for example. For a blog post on how to do this see this blog post, and note my comment on an easier way to do the last two steps (no need to edit the project file as a text file).

Dad
A: 

Try setting the architecture you want to build for in the Xcode project preferences and rebuilding.

If this doesn't work, completely uninstall Xcode and downgrade. You have to completely uninstall because your system must have updated the frameworks for 4.0.

Hope this helps

Yasky
The question actually boils down to: How to do it *without* downgrading.
Piotr Kalinowski