Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install ios 5 simulator to xcode 5.1?

Tags:

xcode

ios

I am currently using xcode 5.1 with Mac 10.8.5. But i can not install ios simulator in this xcode? any one tell me how to install ios 5 simulator ?

like image 597
Piyush Avatar asked Mar 18 '14 12:03

Piyush


1 Answers

Man, this really made me angry today when I upgraded from Xcode 5.0 to Xcode 5.1 and discovered that I no longer had a functional iOS 5.1 simulator. There was nothing in the Software Update process that gave me any heads-up whatsoever that this would disable iOS 5.0/5.1 simulators. Bad Apple! Bad!

Anyway, here's the workaround I came up with. It seems pretty clean.

  1. I noticed that in ~/Library/Caches/com.apple.dt.Xcode/Downloads there was an old file sitting around called Xcode.SDK.iPhoneSimulator.5.1-5.1.dmg (thank god I never cleared out that cache directory).
  2. I double-clicked this disk image to mount it, and then double-clicked the .pkg file inside that. The package installer then placed the contents into a subdirectory of /Platforms.
  3. I then moved /Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk into /Applications/Xcode/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs and restarted Xcode.

Bam. Done. Back in business.

Note: Another approach, if you happen to have a thorough Time Machine backup of your full system, as Pandey Laxman pointed out earlier, is simply to restore the contents of /Applications/Xcode/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk from an older backup. In my case, I wasn't able to do this because my development system is a MacBook Air that I keep backed via Time Machine up onto a permanently-installed 32GB SanDisk Cruzer Fit USB flash drive (as well as two extra Time Machine backups on separate network drives). Anyway, because the backup drive is relatively small, when I first set up Time Machine on this system, I had excluded /Applications from my backup (something I don't recommend doing).

like image 199
Todd Lehman Avatar answered Oct 18 '22 11:10

Todd Lehman