question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Regularly reset iOS/tvOS Simulators

See original GitHub issue

Context

The Simulators are slowing down as they are being used. The folder with their data grows substantially. I did an analysis and found sizes up to 12 GB, most frequently ranging from 2 to 7 GB. This is a potential cause of the slowdown.

To be done

XHarness has a command that wipes the Simulator data and resets the Simulator. We should do this repeatedly on our OSX queues to keep them healthy.

A good fit might be the weekly OSOB pipeline?

Notes

Simulators can be reset via following Helix job:

sudo rm -rf /Users/helix-runner/.dotnet # some machines have global .NET installed and there are permission problems
curl -sL aka.ms/get-xharness | bash -
export DOTNET_ROOT=./.dotnet

# Reset iOS
sid=`./xharness apple device ios-simulator-64`
du -sh ~/Library/Developer/CoreSimulator/Devices/$sid
./xharness apple simulators reset-simulator -o . -t ios-simulator-64
du -sh ~/Library/Developer/CoreSimulator/Devices/$sid

# Reset tvOS
sid=`./xharness apple device tvos-simulator`
du -sh ~/Library/Developer/CoreSimulator/Devices/$sid
./xharness apple simulators reset-simulator -o . -t tvos-simulator
du -sh ~/Library/Developer/CoreSimulator/Devices/$sid"
Build Kind Start Time
1863024 Rolling 2022-06-07
1865333 Rolling 2022-07-07
1867636 Rolling 2022-08-07

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
premuncommented, Jul 19, 2022

This PR moves runtime onto 12.00 with newer simulators that have never been reset. Let’s see if this alleviates the issue

0reactions
premuncommented, Feb 8, 2023

The original reset we talked about and are not going to do but the unrelated issue discussed below has been resolved by https://github.com/dotnet/arcade/issues/11700

Read more comments on GitHub >

github_iconTop Results From Across the Web

Reset iOS Simulator application data to run app for first time
In the iOS Simulator, press iOS Simulator in the menu at the top of the screen, and press 'Reset Content and Settings...'.
Read more >
Xcode Beta Simulator on Mac OS Ventura Often Needs ...
Noticing that the simulator is often in some state that requires it to Quit and restart it. I often do this: CMD+R to...
Read more >
Xcode Simulator's advanced features
The iOS simulator in Xcode makes the job easy, as you can effectively replicate any app environments right from your Mac.
Read more >
Can I delete unnecessary device simulators of Xcode?
Click "System Settings..." from the Apple menu in the top-left corner. · Select "General" · Select "Storage" · Click the (i) next to...
Read more >
Ios simulator reset. Then it just hangs. Type i and a or c
Ios simulator reset. Then it just hangs. Type i and a or click on Run on iOS simulator and Run on Android device/emulator...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found