Is it possible to get the iOS 5.1 SDK for Xcode 4.2 on Snow Leopard?

72,078

Solution 1

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

  1. If you have another Mac running Lion and Xcode 4.3.1 you can copy the files from:

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

  2. Place the copied files in the equivalent place on your Snow Leopard Mac: probably

    /Developer/Platforms/iPhoneOS.platform/DeviceSupport

  3. Similarly copy the iOS 5.1 SDK files found in this directory:

    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk

  4. Also copy 'version.plist' from the Lion machine in the iPhoneOS.platform folder to the Snow Leopard machine.

  5. Re-start Xcode on the Snow Leopard machine and re-connect the devices and it seems happy enough.

If you don't have access to a machine with Lion and Xcode 4.3.1:

  1. You can get the files out of the 4.3.1 DMG which can be downloaded from Apple here: Downloads for Apple Developers.

  2. Mount the DMG, Show Package Contents on the Xcode icon and drill down to

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

  3. Follow the steps above.

You might find it more convenient to use Apple's proprietary ditto method (sudo ditto src dest) in the terminal window to copy the folders.

Note,this hack will also work for latest iOS 6 SDK.

Solution 2

You have to get Lion, iOS 5.1 SDK is only for Xcode 4.3.1 which is only available for Lion.

... and your Xcode will not be able to build to your device if you have already updated it to 5.1 because it won't be on that version of Xcode's approved SDKs

Solution 3

I'm working on this now. I have the same issue.

The MAJOR PROBLEMS here are that:

1) Apple never provided a warning dialog that this might disable people developing under Snow Leopard.

2) There is no easy way to undo this.

3) This should not happen on a point release update.

I've tried to install the previous ipsw from 5.0.1 for my Gen 4 IPod Touch from here: where to download ipod touch firmware restore links It will not install.

I've downloaded the Lion Xcode 4.3.1 from here (sign in as a developer first) Lion Xcode 4.3.1

And run some scripts from the Dev Forums here:

sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/

sudo cp -R /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1\ \(9B176\) /Developer/Platforms/iPhoneOS.platform/DeviceSupport/
cd /Developer/Platforms/iPhoneOS.platform/DeviceSupport/

sudo rm -f ./Latest

sudo ln -s ./5.1\ \(9B176\) ./Latest

Unmounted the Lion DMG and restarted Xcode. This allowed me to test 5.1 in the simulator but broke every build to every device with a SIGABRT or link error.

I'm off to the Apple store to have them restore my device. If I get any more information, I'll let you all know. This has been a VERY EXPENSIVE and VERY UNPLEASANT surprise.

Solution 4

Adding to Richards solution above, I found that if you also copy, from XCode 4.3.1 dmg...

edit: updated to correct path within dmg

/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Develope‌​r/SDKs/iPhoneOS5.1.sdk ~~ (entire directory tree)

to

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/

XCode debugger will startup correctly (without all the error log and dumps)

ie:
===============================================================================
warning: Unable to read symbols from "dyld" (prefix __dyld_) (not yet mapped into memory).
warning: Unable to read symbols from "SystemConfiguration" (not yet mapped into memory).
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)/Symbols/System/Library/Frameworks/MessageUI.framework/MessageUI (file not found).
warning: No copy of dyld found locally, reading from memory on remote device.  This may slow down the debug session.
warning: No copy of <No file name> found locally, reading from memory on remote device.  This may slow down the debug session.
warning: No copy of <No file name> found locally, reading from memory on remote device.  This may slow down the debug session.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)/Symbols/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration (file not found).
warning: No copy of SystemConfiguration.framework/SystemConfiguration found locally, reading from memory on remote device.  This may slow down the debug session.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)/Symbols/System/Library/Frameworks/MessageUI.framework/MessageUI (file not found).
warning: No copy of MessageUI.framework/MessageUI found locally, reading from memory on remote device.  This may slow down the debug session.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)/Symbols/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox (file not found).
warning: No copy of AudioToolbox.framework/AudioToolbox found locally, reading from memory on remote device.  This may slow down the debug session.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)/Symbols/System/Library/Frameworks/iAd.framework/iAd (file not found).
warning: No copy of iAd.framework/iAd found locally, reading from memory on remote device.  This may slow down the debug session.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)/Symbols/System/Library/PrivateFrameworks/SpringBoardServices.framework/SpringBoardServices (file not found).
warning: No copy of SpringBoardServices.framework/SpringBoardServices found locally, reading from memory on remote device.  This may slow down the debug session.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/5.1 (9B176)/Symbols/System/Library/PrivateFrameworks/FTClientServices.framework/FTClientServices (file not found).
warning: No copy of FTClientServices.framework/FTClientServices found locally, reading from memory on remote device.  This may slow down the debug session.
===============================================================================

Solution 5

There is an answer here that also provides the copy of the simulator v 5.1. No manual operations. Just open the Terminal, copy and paste the provided commands.

http://www.iphonedevsdk.com/forum/iphone-sdk-development/100229-snow-leopard-sdk-5-1-a.html

Share:
72,078
jpsasi
Author by

jpsasi

iOS &amp; Android Application developer. Have released INDRadio,ASIRadio in both iOS and Android and EURRadio application in iOS Platform.

Updated on July 08, 2022

Comments

  • jpsasi
    jpsasi almost 2 years

    I still have Snow Leopard. I have Xcode 4.2 for iOS development. This morning I upgraded my iPhone and iPad to iOS 5.1.

    But Xcode 4.2 is not detecting my device for testing. I could not find the iOS 5.1 SDK image on Apple's developer site, for Xcode 4.2.

    I don't want to do upgrade to Lion to get XCode 4.3 at this time.

    Will I able to use Xcode 4.2 (on Snow Leopard) for iOS development now?

  • jpsasi
    jpsasi about 12 years
    As Mountain lion will be released in couple of months, i dont want to upgrade to Lion now, Assuming that i should be able to upgrade to Mountain Lion from Snow Leopard. I guess i need to find a way to restore iOS 5.0.1 to my device. Thanks
  • Pochi
    Pochi about 12 years
    you are welcome. It shouldnt be that hard to restore, Like i told you before, xCode provides the restore feature (found in the organizer menu window->organizer->devices->RestoreIphone). Btw dunno if you can go straight to mountain lion, as an example you have to pass trough snowleopard to get to lion from leopard.
  • jpsasi
    jpsasi about 12 years
    Today i have upgraded my system to Lion. Thanks for the Hack.
  • OnTheFly
    OnTheFly about 12 years
    Thanks very much :) Worked perfect for me. At least I'll be able to develop with sl for some more time.
  • Dan Dyer
    Dan Dyer about 12 years
    Thanks, this is almost working for me but when I try to debug an app on the device from XCode it hangs on the launch image. This may or may not be related to the fact that I downloaded the .dmg twice and both times the checksum verification failed, so I skipped it and carried on regardless.
  • Dan Dyer
    Dan Dyer about 12 years
    I fixed the above problem by also copying across the files in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhone‌​OS5.1.sdk. Thanks for this, I can now defer replacing my ancient Mac for at least a couple more months.
  • Seamus
    Seamus about 12 years
    March 10th: Did not work. Got a message stating the version of the software was not supported for my device, an iPod Touch 4G.
  • booker
    booker about 12 years
    Apple stopped to sign it since last week end
  • Richard Groves
    Richard Groves about 12 years
    I think the path you mean is: /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhone‌​OS.platform/Develope‌​r/SDKs (which is a bit deeper than your post suggests - complicated hierarchy Apple's ended up with isn't it?)
  • dklt
    dklt about 12 years
    indeed, you are correct. updating post to reflect your correct path. cheers ~
  • Vincent Bacalso
    Vincent Bacalso about 12 years
    can someone explain this step here: then mount the DMG, Show Package Contents on the XCode icon and drill down to?
  • Mark Steudel
    Mark Steudel about 12 years
    Drill down to: "/Applications/Xcode.app/Contents/Developer/Platforms/iPhone‌​OS.platform/DeviceSu‌​pport/5.1 (9B176)"
  • aiham
    aiham about 12 years
    Thanks a lot. Dan Dyer's comment also helped. I'm now using iOS SDK 5.1 from Xcode 4.2
  • TheEnigmaMachine
    TheEnigmaMachine about 12 years
    Thanks a ton! I had the same problem as Dan Dyer, but copying the file from Dan's comment fixed it.
  • natbro
    natbro about 12 years
    be sure to also follow the advice to copy the /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/iPhone‌​OS.platform/Develop‌‌​​e‌​r/SDKs/iPhoneOS5‌​.1.sdk files from the DMG into your /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/ (and the .plist mentioned in this answer), otherwise debug is fairly broken. You will also want to do a clean build of your project or breakpoints won't work
  • EdH
    EdH about 12 years
    I entirely agree with you. Apple's behavior on this is beyond irresponsible. It tells you: they just don't care.
  • SubG
    SubG about 12 years
    Richard Groves' method worked great for me - thanks. Plus with the debug issue posted by Dan Dyer, turns out that after waiting for 15 minutes (!) after app launch from Xcode, the debugger finally catches up and the app starts working... Not very practical, but keeps me working while waiting for the .dmg download...
  • SubG
    SubG about 12 years
    @natbro - I still see the 4.3.1 dmg fine at developer.apple.com/downloads/index.action# and am currently downloading it.
  • Craig
    Craig about 12 years
    Thanks Substance G, the other download links listed here were failing in various ways, but that page worked fine.
  • Vaishnavi Naidu
    Vaishnavi Naidu about 12 years
    I followed both Richard Groves and @dklt's set of instructions. It did not work. But I fired the scripts given in this link and it worked like a charm
  • natbro
    natbro about 12 years
    thanks @SubstanceG -- it does seem to be back, but seriously, it was not there for me then, though now it is :) still, other info still applies.
  • Lavamantis
    Lavamantis about 12 years
    None of those DMG files at any of the links above would open for me on Snow Leopard - they all said invalid checksum. Luckily, I had an old USB harddrive and installed Lion on it. It doesn't recognize my Bootcamp partition (bad!), but at least I was able to grab the SDK and finish up my app. Thanks.
  • necixy
    necixy almost 12 years
    Worked Perfectly for me!!!! I have 10 mac and it was hard to update them all for me just for a silly update done by mistake. You saved my life! :) I wish I could up vote 100 times!!
  • Konstantin Salavatov
    Konstantin Salavatov almost 12 years
    Works just fine with dmg of latest xcode 4.3.2 dmg and iOS 5.1.1 on xcode 4.2 (old mac mini does not support Lion)
  • martin jakubik
    martin jakubik almost 12 years
    This worked for me today. I'm on SL with xcode 4.2. [Mac OS X 10.6.8 (10K549). Xcode 4.2 (4C199). iPhone OS SDK 5.0: (9A334).]
  • Roel Van de Paar
    Roel Van de Paar almost 12 years
    "This web page at www.iphonedevsdk.com has been reported as an attack page and has been blocked based on your security preferences." - I would be very careful :)
  • Roel Van de Paar
    Roel Van de Paar almost 12 years
    Apparently it will not be necessary to upgrade to Lion first and you can go straight from Snow Leopard to Mountain Lion
  • Roel Van de Paar
    Roel Van de Paar almost 12 years
    You can find the .app file in ~/Library/Developer/Xcode/DerivedData/{app name}/Build/Products/Deployment/ (thanks to stackoverflow.com/a/9673810/1208218)
  • Roel Van de Paar
    Roel Van de Paar almost 12 years
    And some more info here in terms of how exactly to get this all running: stackoverflow.com/a/11460561/1208218
  • prossel
    prossel almost 12 years
    The whole iphonedevsdk.com site has been reported, not only this page.
  • Krym
    Krym over 11 years
    XCode 4.3.3 contains it as well and works great. Thanks a lot for this
  • John Lee
    John Lee over 11 years
    Sweet! Snow Leopard, Xcode 4.2, running apps on iphone 3GS with iOS6
  • Alex Zavatone
    Alex Zavatone over 11 years
    I used to love Apple before I became one of the poor bastards who had to develop on the iOS platform.
  • herzbube
    herzbube over 11 years
    In my case the Symbols alias was already there after I had copied the DeviceSupport/6.0 (10A403) folder from the Xcode 4.5 disk image.
  • Sr.Richie
    Sr.Richie over 11 years
    "iOS Simulator could not find the SDK. The SDK may need to be reinstalled." That's the error I have after following the instructions...." I'm trying to run iOS 6.0 in the simulator
  • Asta ni enohpi
    Asta ni enohpi over 11 years
    @Richard Groves: is there any way to upgrade IOS 6 simulator for in xcode 4.2 snow leopard as like device SDK?
  • JRoss
    JRoss over 11 years
    This seems to work initially, but I get the following error when I attempt to switch between viewControllers when I test with my device: Error Starting Executable “AppName" Error launching remote program: failed to get the task for process 453. @Richard do you know why?
  • JRoss
    JRoss over 11 years
    I also installed the iOS 6.0.1 files from XCode 4.5.2.dmg @HenrikErlandsson, but I get the above error when I attempt to test on my device (iOS 6.0.1). Do you experience any problems?
  • JRoss
    JRoss over 11 years
    I get the following errors when I do this @hchouhan02: Interface Builder XIB Compiler Error: "Command /Developer/usr/bin/ibtool failed with exit code 255" and Uncategorized: "Build task failed without generating error messages."
  • Henrik Erlandsson
    Henrik Erlandsson over 11 years
    We tested this before the holidays. I can build fine for an Iphone 4S with latest 6.0.1 (10A523), but not with an Iphone 5 with latest 6.0.1 (10A525). We think the reason XCode can't green-light the device in Organizer has to do with the change in upgrading method (over-the-air, no files to download on developer.apple.com), but if someone succeeds we'd like to hear about it.
  • hchouhan02
    hchouhan02 over 11 years
    Try this => quit xcode => open xcode => clean project after try to build project.
  • Sufian
    Sufian over 11 years
    It works but Xcode 4.2 but sadly doesn't with Xcode 3.2. Still, it did help me out in other project. :) +vote