21

Possible Duplicate:
ios 5.1 with xcode 4.2 for iOS development

I updated my iPhone to iOS 5.1. My operating system is Snow Leopard.
Now I need the sdk 5.1 to develop, with xcode 4.2.

Where can I download it?
Any suggest?

Solution: Downgrade to ios5.0 or update to Lion

Community
  • 1
  • 1
Dany
  • 2,290
  • 8
  • 35
  • 56
  • 1
    Same question here : http://stackoverflow.com/questions/9613565/ios-5-1-with-xcode-4-2-for-ios-development/9613774#comment12199185_9613774 – Pochi Mar 08 '12 at 08:58
  • 2
    Please don't edit answers, to thank for a solution, but vote them up, and mark one of them as accepted. Thanks. – user unknown Mar 15 '12 at 20:16

4 Answers4

55

To get Xcode 4.2 on Snow Leopard to run code on a device running 5.1 you can do this:

If you have another Mac running Lion + XCode 4.3.1 you can copy the files from:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)

to the equivalent place on your SL Mac: probably

/Developer/Platforms/iPhoneOS.platform/DeviceSupport

and also copy version.plist from the Lion machine in the iPhoneOS.platform folder to the SL machine.

Re-start XCode on the SL machine and re-connect the devices and it seems happy enough.

[Edit: If you don't have access to a machine with Lion+4.3.1 you can get the files out of the 4.3.1 DMG which can be downloaded from Apple here: http://adcdownload.apple.com/Developer_Tools/xcode_4.3.1_for_lion/xcode_4.3.1_for_lion.dmg

then mount the DMG, Show Package Contents on the XCode icon and drill down to

/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport to 

find the files mentioned above.]

In steps:

  1. Stop XCode on SL machine
  2. Disconnect your iphone
  3. Mount the Xcode 4.3.1 image (.dmg that you can download from Apple dev site)
  4. Show package contentes of the Xcode 4.3.1
  5. copy XCode/Xcode/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176) to <HD>/Developer/Platforms/iPhoneOS.platform/DeviceSupport
  6. copy XCode/Xcode/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/version.plist to <HD>/Developer/Platforms/iPhoneOS.platform/
  7. Start Xcode
  8. connect your iphone and it should work.
QuantumMechanic
  • 13,795
  • 4
  • 45
  • 66
Richard Groves
  • 3,596
  • 3
  • 21
  • 21
  • 2
    There are a few other folders to grab. See https://devforums.apple.com/message/630144#630144 – Jesse Fulton Mar 09 '12 at 21:48
  • 1
    sadly the 4.3.1 dmg has since disappeared and standalone dmg install is being deprecated in favor of app store install of xcode, not clear you will be able to get the dmg from that in the future. with careful hunting & cursing it's possible to find the 4.3.2 dmg (http://adcdownload.apple.com/Developer_Tools/xcode_4.3.2/xcode_432_lion.dmg), but this may be the last dmg available and i don't yet know if the workaround above works with this dmg, waiting for it to d/l. – natbro Mar 22 '12 at 07:49
  • 1
    hooray, same instructions work for the 4.3.2 dmg. be sure to also follow the advice to copy the `/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Develope‌​r/SDKs/iPhoneOS5.1.sdk` files from the DMG into your `/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/`, otherwise debug is fairly broken. You will also want to do a clean build or your breakpoints won't work. – natbro Mar 22 '12 at 08:30
  • it still doesn't seem to work for me. I re-installed xcode 4.2 from clean and copied those files to the folder. But xcode still doesn't recognize device... and Organizer claims bout permission to save file such that "You don’t have permission to save the file “iOS DeviceSupport” in the folder “Xcode”." Any idea?? I can't do anything... ugh – REALFREE Apr 07 '12 at 03:20
  • I guess... device version does not match. In 4.3.1 xcode supports 5.1(9B176) but my device (4s) is under 5.1(9B179).... – REALFREE Apr 07 '12 at 03:26
  • It worked! I copied over a lot of other files as well, including the simulator SDKs, and making the latest alias point to 5.1. :) – Tustin2121 Apr 18 '12 at 05:27
  • No surprise here really, but [XCode 4.3.3](http://adcdownload.apple.com/Developer_Tools/xcode_4.3.3_for_lion/xcode_4.3.3_for_lion.dmg) is available at [http://adcdownload.apple.com/Developer_Tools/xcode_4.3.3_for_lion/xcode_4.3.3_for_lion.dmg](http://adcdownload.apple.com/Developer_Tools/xcode_4.3.3_for_lion/xcode_4.3.3_for_lion.dmg). – Big Rich Jul 13 '12 at 10:42
  • Works like a charm. Spent almost 2 days to get this sorted .Finally this solution helped. – MountainRock Aug 06 '12 at 22:31
  • Works like a charm, also for the 4.4.1 update. Thanks! – davidav Aug 17 '12 at 11:05
26

You can't.

You need to update to Mac OS 10.7 Lion in order to get the latest version of Xcode with the 5.1 SDK.

The last installable version of Xcode on Snow Leopard will be 4.2. Apple really wants developers to keep up to date on everything, whether MacOS or iOS.

Michael Dautermann
  • 88,797
  • 17
  • 166
  • 215
1

If you want to stay on Snow Leopard, download the iOS 5.0.1 firmware of your device on this link : http://www.iphonefirmware.com/firmwares-download.

And do a manual restore on iTunes.

I did it today (March 8, 2012) on my iPad 2 and it works, Apple still seems to sign this iOS version.I guess not for a long time, so do it quickly.

booker
  • 1,256
  • 1
  • 12
  • 18
0

iOS 5.1 is only avalaible in xCode 4.3.1, and its only avalaible in Lion, sorry.

YOu can try changing the version of your mac and faking it to install 4.3.1, but I cannot assure you its going to work...

Antonio MG
  • 20,382
  • 3
  • 43
  • 62