Xcode 6.4 showing duplicate 'Simulators' with Unique Id

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

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

\"enter

相关标签:
8条回答
  • 2020-12-04 07:13

    Go to the terminal to see the list of simulators using:

    xcrun simctl list
    

    Use the id's to delete the duplicates using:

    xcrun simctl delete <ID>
    

    E.g.

    xcrun simctl delete 4B645F13-D130-412D-8EB4-B49BE7E2D7DA
    
    0 讨论(0)
  • 2020-12-04 07:16

    Looks like a ton of simulators were split into separate devices when updating. So what it sounds like you'd like to do is reduce your list of output decides.

    To view the list of simulators, on the menu bar, goto: Window > Devices. Here you will see all the simulators shown in your output list. There is no reason to not delete and start over by adding the simulators you want

    0 讨论(0)
  • 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 "{}"
    
    0 讨论(0)
  • 2020-12-04 07:26

    I have an easier way to fix this.

    Run the following:

    xcrun simctl list devices | grep -v '^[-=]' | cut -d "(" -f2 | cut -d ")" -f1 | xargs -I {} xcrun simctl delete "{}"
    
    0 讨论(0)
  • 2020-12-04 07:27

    Fixed it by going into Menu->Window->Devices and removing the duplicates (if you see multiple simulators for iPhone 6 for example remove all but one).

    0 讨论(0)
  • 2020-12-04 07:29

    I ended up creating a script to remove Xcode simulator duplicates:

    https://gist.github.com/buscarini/6ec0ef1385f47fdbc505

    0 讨论(0)
提交回复
热议问题