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.

  1. With the project open in code, go to the menu bar, choose Product -> Clean or:
  2. 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:

  1. In the Code project, click on the Product menu while holding down Option and choose Clean build folder, or:
  2. 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.

  1. In the menu, choose Window -> Organizer.
  2. Now select Projects -> Select your project.
  3. Choose the project whose derived data you want to delete.
  4. In the window that opens, you’ll see see the Derived Data folder listed, along with its Finder path.
  5. To the right of the folder, there’s a Delete button. Press it.

Now, delete the module cache.

  1. Go to: ~/Library/Developer/Xcode/DerivedData/ModuleCache.
  2. Drag the files from the ModuleCache folder to the Trash and empty it.