How to remove older unneeded devices?

梦想的初衷 提交于 2019-12-20 10:49:09

问题


So this is related to a prior question I posted - how to remove 4.3 simulators. I stupidly installed the iOS 5.0 Simulator, and now the technique offered in my last post does not work. When you remove the 5.0sdk, then restart Xcode, it forces you to install the legacy simulators or quit.

I even deleted Xcode 4.4 and re-installed it to no avail (it must store my unfortunate choice deep in the preferences file).

The reason I want to get rid of it is that the Scheme popup now has 5 options in it instead of 3, making it a real pain to test a Universal App.

EDIT:

When I cd to ~/Library/Caches/com.apple.dt.Xcode/Downloads I see:

$ ls

Xcode.SDK.iPhoneSimulator.5.0-5.0.0.1.dmg
Xcode.SDK.iPhoneSimulator.5.0-5.0.1.1.dmg
eded78df8bfabaf6560841d10cf8e53766f74f28.dvtdownloadableindex
f7133e82a08bdb4ebf724f16beed2bbac2a265cf.dvtdownloadableindex

$

I have both Xcode 4.4 and 4.5DP3 on my machine, so assume that the first two files are one per Xcode release - in any case I moved both to /tmp.

The earlier suggestion had been to remove:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk


回答1:


In addition to removing the iPhoneSimulator5.0.sdk folder, delete the corresponding .dmg file in ~/Library/Caches/com.apple.dt.Xcode/Downloads. Then Xcode will not force you to reinstall it anymore.




回答2:


Do the following in terminal:

cd ~/Library/Caches/com.apple.dt.Xcode/Downloads
ls

You'll see the files now; then run the bash command to remove them.



来源:https://stackoverflow.com/questions/11672945/how-to-remove-older-unneeded-devices

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!