7

I just downloaded the iOS 17 runtime, but after copying it into the destination, this popup opens and the Xcode could not use the simulator as expected:

Popup

Downloaded from the Apple Developer site

How can I fix this?

Mojtaba Hosseini
  • 95,414
  • 31
  • 268
  • 278

3 Answers3

6

It is possible to call simctl on the downloaded .dmg to add the simulator runtime manually. That is a safer workflow that also performs code signing verification. The command would be:

xcrun simctl runtime add <pathTo/platform_simulator_runtime.dmg>

Manually copying the .simruntime into the intended location for installation is an unsupported workflow.

To learn more, take a look at https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes

jyao
  • 71
  • 2
2

⚠️ Overcome the error:

This error is because of some permissions of the copying files. You should trust the DMG before coping the the file to make them verified:

  1. Close Xcode and Eject the simulator DMG.
  2. Change the attributes of the downloaded dmg using the following command:

xattr -cr PATH_TO_DOWNLOADED_DMG

  1. Copy the .simruntime to the desired destination (/Library/Developer/CoreSimulator/Profiles/Runtimes)
  2. Run Xcode again and wait for the validation to be completed

Use Xcode command line to install the DMG

Xcode can install runtimes and verify them on the fly with the xcrun tool:

xcrun simctl runtime add <Drag DMG Here>
Mojtaba Hosseini
  • 95,414
  • 31
  • 268
  • 278
  • 1
    I just had the same issue and these steps solved it for me. You should accept your own answer! – Johnathon Karcz Jun 07 '23 at 14:41
  • I'm wondering, does this skip the code signing and might actually allow harmful code to be executed? Some other (strangely) downvoted answers suggested using the commands Apple provided, which basically boils down to something like: `sudo xcrun simctl runtime add ~/Downloads/iOS_17_beta_Simulator_Runtime.dmg` It did work for me without any issues. – Marco Boerner Jun 08 '23 at 13:24
  • @MarcoBoerner It’s not as dangerous as using `sudo`. Although that method is an alternative to install runtimes (I think for Xcode 15) they does not answer the original question which is downloaded from the Apple – Mojtaba Hosseini Jun 09 '23 at 00:17
0

You're not supposed to copy it by hand. After downloading Xcode, the runtime .dmg and the download manifest, start Xcode. It will prompt you to install the already downloaded runtime.

See the documentation: https://developer.apple.com/documentation/xcode/installing-additional-simulator-runtimes#Install-Simulator-runtimes-from-the-Apple-Developer-website

  • In my case Xcode 15 beta 1 would download but fail to complete installation due to a "registration" error, so I went with the accepted answer. – invisible squirrel Jun 19 '23 at 00:33
  • The documentation doesn't make sense. Nothing happens after the files finish downloading and if you launch Xcode it displays a dialog asking to download the simulators again. – malhal Jun 22 '23 at 09:49
  • I just installed the Beta 2 and it worked like the documentation says. It registered that I already downloaded the iOS and VisionOS runtimes and installed them on the first start of the Xcode Beta. Maybe in the first Beta the installation process was still a bit buggy? – Holger D. Jun 23 '23 at 06:57