How to fix "Unable to boot the iOS simulator" error
Table of Contents
Today, while I was trying to run an iOS project, an iOS simulator failed to launch with the following error.
Unable to boot the iOS simulator.
There might be several reasons that cause this error. I find many solutions out there, but I will share the one that works for me. And I hope it will also work for you.
You can easily support sarunw.com by checking out this sponsor.
Build, manage, and grow in-app purchases: Glassfy's SDK makes it simple to build in-app subscriptions or one-time purchases. Glassfy offloads managing backend infrastructure and building paywalls so that you can focus on better monetizing your app or other tasks.
For me, the solution for this error is to nuke all the simulators and recreate them. It sounds scary, but Fastlane has an action named
reset_simulators that do all the hard lifting for you.
The only thing you need to do is install Fastlane and run the following command.
fastlane snapshot reset_simulators
You will be asked for confirmation.
Are you sure? All your simulators will be DELETED and new ones will
be created! (You can use `SNAPSHOT_FORCE_DELETE` to skip this confirmation)
Just type "y" and continue. Then, you will see deleting and creating logs—something like this.
[23:38:35]: Deleting iPhone 6s
[23:38:35]: Deleting iPhone 6s Plus
[23:38:35]: Deleting iPhone SE (1st generation)
[23:38:35]: Deleting iPhone 7
[23:38:35]: Deleting iPhone 7 Plus
Creating iPhone 6s for iOS version iOS 15.4
Creating iPhone 6s Plus for iOS version iOS 15.4
Creating iPhone SE (1st generation) for iOS version iOS 15.4
Creating iPhone 7 for iOS version iOS 15.4
Creating iPhone 7 Plus for iOS version iOS 15.4
After the action is finished, your simulator should be working again.
Read more article about Xcode, Fastlane, or see all available topic
Enjoy the read?
If you enjoy this article, you can subscribe to the weekly newsletter.
Every Friday, you'll get a quick recap of all articles and tips posted on this site. No strings attached. Unsubscribe anytime.
Feel free to follow me on Twitter and ask your questions related to this post. Thanks for reading and see you next time.
If you enjoy my writing, please check out my Patreon https://www.patreon.com/sarunw and become my supporter. Sharing the article is also greatly appreciated.Become a patron Buy me a coffee Tweet Share
Swift typealias: What is it and when to use it
A type alias declaration introduces a named alias of an existing type into your app. You can think of it as defining a nickname for an existing type. Let's learn the benefit and when to use them.
How to force two lines of Text in SwiftUI
We have no way to set the minimum lines of Text in SwiftUI, but you can have that with this bit of hack.