Xcode 6.4 showing duplicate 'Simulators' with Unique Id

后端 未结 8 1990
忘掉有多难
忘掉有多难 2020-12-04 06:33

Till yesterday, everything was normal with Xcode. It was showing simulators as :

\"enter

8条回答
  •  天涯浪人
    2020-12-04 07:24

    Doz's oneliner is good, but the part that extracts the UUID of them simulator fails on some iPad devices like 'iPad Pro (12.9 inch)' because they have parentheses in the name. I rewrote to use grep instead of cut to account for this:

    xcrun simctl list devices | grep -o '[A-F0-9]\{8\}-[A-F0-9]\{4\}-[A-F0-9]\{4\}-[A-F0-9]\{4\}-[A-F0-9]\{12\}' | xargs -I {} xcrun simctl delete "{}"
    

提交回复
热议问题