Kerido
Kerido

Reputation: 2940

Xcode 4.2 and iOS SDK 4.0

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:

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.

Upvotes: 2

Views: 2295

Answers (2)

Dilip Rajkumar
Dilip Rajkumar

Reputation: 7074

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

Upvotes: 0

user704010
user704010

Reputation:

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.

Upvotes: 3

Related Questions