2
votes

Just upgraded from Xcode 4.0.2 to 4.2.0 App was running fine when compiled with 4.0.2 and simulating well on everything down to iPad iOS 3.2

The only thing I changed was the issue related to dismissing modal view controllers by using the following code within the affected controllers:

// Dismiss the modal view
// Because iOS 5 breaks the way it was done before we have to make a quick check in 
// order to know what method we can use
//
if ([self respondsToSelector:@selector(presentingViewController)]) 
{
    // iOS 5 requires this method to dismiss the view
    [[self presentingViewController] dismissModalViewControllerAnimated:NO];
}
else
{
    // Prior to iOS 5 this works
    [[self parentViewController] dismissModalViewControllerAnimated:NO];
}

No other changes to the code. This code has nothing to do with the simulator and does not affect it (other than without it iOS 5 fails to dismiss).

Now when I ask to run on the iPad 3.2 simulator I get:

"iOS Simulator could not find the SDK. The SDK may need to be reinstalled."

I checked and the SDK is truly there at:

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk

I even used a file comparison tool to check the files in that directory with those from the installation files that came with 4.0.2. They match exactly.

Not really sure what's going on. I've reset the simulator, shutdown and restarted Xcode to no avail. This should work.

"Deployment Target" is set to 3.2 (always was) "Devices" = Universal (always was)

Any pointers would be appreciated.

UPDATE: I uninstalled the dev tools completely with:

sudo /Developer/Library/uninstall-devtools -mode=all

Then I re-installed Xcode 4.2.
As the selected answer indicates, Xcode 4.2 does not support simulation of iOS older than 4.3. Something happened as I upgraded from Xcode 3.x to 4.0.x to 4.2 and I still had a working iPad 3.2 simulator for a while. And then it stopped working...never to come back. Oh, well.

2

2 Answers

0
votes

when I ask to run on the iPad 3.2 simulator

I don't have that option in my Xcode 4.2, even with Deployment Target set to 3.x. I can only run with iPad 4.3 Simulator or iPad 5.0 Simulator. So I'm guessing that the iPad 3.2 Simulator option - for some reason - is still selected (or selectable) in your project, which might indicate something odd about either your project or your installation of Xcode.

If you want to be sure that your app runs on an iPad with iOS 3.2 installed when building with Xcode 4.2 your only option is to test it on an iPad running iOS 3.2.

0
votes

It seems the problem is the iOS simulator app, I tested replacing the iOS simulator app present in xcode 4.2 for that present in xcode 3.2.6 and the iOS simulator from 3.2 to 4.3 launched successfully. But the iOS simulator 5.0 broke and didn't work anymore.

So, What I did was to make a whole xcode 4.2 copy so that one copy worked with iOS simulator 3.2 and the other worked with the rest of iOS simulators.