2

I installed Xcode 4.2 and it only has iOS SDK version 5 under /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk. However, my iOS Deployment Target is specified as iOS 4.0. The problem is that I cannot launch my app in the iOS Simulator if the version of the Simulator is lower than 5.0. That is, the program crashes under those:

  • iPhone 4.0 Simulator
  • iPhone 4.1 Simulator
  • iPhone 4.2 Simulator
  • iPhone 4.3 Simulator

Before I had Xcode 4.0 and everything worked correctly under all of the above simulators. Now the only working version is iPhone 5.0 Simulator.

Am I doing something wrong? How do I test my app on older iOS versions? Is it even possible with Xcode 4.2?

UPDATE: It all started working after I changed the compiler from LLVM GCC 4.2 to Apple LLVM compiler 3.0. But I'm still interested if anyone knows how to fix the stuff with the old compiler.

Kerido
  • 2,930
  • 2
  • 21
  • 34

2 Answers2

3

You must download in Components : iOS 4.0 and 4.1 Debugging Support and iOS Simulator for 4.x You can update Deployment Target to iOS 5 because it's a later version of SDK that "knows" all about 4-version. Keep in mind that if no debug build if SDK < OS.

  • Could you please clarify what exactly I need to do? – Kerido Nov 27 '11 at 09:31
  • in Xcode preferences , at Downloads tab , look for Components , and you should install all components from there –  Nov 27 '11 at 09:54
  • I now have everything installed: * **iOS 4.3 Simulator** (was installed previously) * **iOS 4.0 - 4.1 Device Debugging Support** (downloaded and installed) * **iOS 3.0 - 3.2.2 Device Debugging Support** (downloaded and installed) However, the behavior hasn't changed. Just by looking at components' names, they have something to do with running and debugging on a REAL device. However, my problem is with the Simulator. – Kerido Nov 27 '11 at 10:12
  • @Kerido may be this helps http://stackoverflow.com/questions/7760946/possible-to-target-older-ios-versions-when-using-xcode-4-2-and-ios-5-sdk –  Nov 27 '11 at 13:23
0

Yes it is possible you can install the older version of IOS SDK

  1. Download xcode_3.2.6_and_ios_sdk_4.3.dmg
  2. Mount the .dmg file Inside the disk image there is an invisible "Packages" folder.
  3. To open it select "Go to folder..." command from Finder menu bar and digit the path "/Volumes/Xcode and iOS SDK/Packages/"
  4. Now double-click "iPhoneSimulatorSDK4_2.pkg"
  5. Click into the destination disk and a button "Select folder..." will be revealed
  6. Click the above button and select your "Developer" folder
  7. Install and Restart Xcode.

This will install the Simulator 4.2 SDK (both iPad and iPhone) inside the folder "/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/"

Now inside XCode 4.2 you can select this simulator from the menu.

I got this from following link and it works for me.. https://apple.stackexchange.com/questions/31412/how-can-i-install-iphone-simulator-4-2-on-xcode-4-2

Community
  • 1
  • 1
Dilip Rajkumar
  • 7,006
  • 6
  • 60
  • 76