Xcode Simulator: how to remove older unneeded devices?

前端 未结 19 1854
遇见更好的自我
遇见更好的自我 2020-12-02 03:56

I\'m running Xcode 4.3.1 iOS-Simulator which originally only supports iOS 5.1.

I need to test my code with iOS 4.3, so I used Xcode\'s \"Install\" feature to install

19条回答
  •  天命终不由人
    2020-12-02 04:20

    You can use the following snippet to delete unavailable runtimes:

    echo "rm -rf $(xcrun simctl list runtimes -j |\
          jq ".runtimes[] | select(.isAvailable|not) | .bundlePath" | xargs)"
    

    to execute, remove echo or add | bash at the end.

    If you don't have jq command available, you can get it using brew install jq

提交回复
热议问题