Xcode won't let me use simulator [closed]
Often, problems like this can be resolved by cleaning (deleting the contents of) the Derived Data folder.
Source:
How to clear Xcode cache manually
1. Clean the build
Tip: If you’re trying to fix a problem with Xcode crashing, it’s worth cleaning the project build first. This will get rid of the current build and create a new one next time you run the code.
- With the project open in code, go to the menu bar, choose
Product -> Clean
or: - With the project open, press Command + Shift + K.
2. Clean out the build folder
To clean out the build folder, and get rid of cache files, do the following:
- In the Code project, click on the Product menu while holding down Option and choose
Clean build folder
, or: - Press Command + Shift + Option + K.
3. Reset Simulator content and settings
If neither of the steps above resolves your problem, try resetting the simulator content and settings:
Go to the menu and choose iOS Simulator
, then click Reset Content and Settings
.
4. Delete derived data
If you’re still having problems, try deleting derived data, which will force Xcode to recreate it when you next run it.
- In the menu, choose
Window -> Organizer
. - Now select
Projects -> Select your project
. - Choose the project whose derived data you want to delete.
- In the window that opens, you’ll see see the Derived Data folder listed, along with its Finder path.
- To the right of the folder, there’s a
Delete
button. Press it.
Now, delete the module cache.
- Go to:
~/Library/Developer/Xcode/DerivedData/ModuleCache
. - Drag the files from the ModuleCache folder to the Trash and empty it.