Is there anyone who knows the secrets of RuntimeMap.plist?

Hi,

I'm in the team maintaining company-wise CI for iOS build and test, which runs over 100 macs on the system with every stable versions of Xcode/simulators and the latest beta/rc.

I've been terribly suffered from xcodebuild test failure with simulator destination on Xcode beta series since Xcode 14.x has changed its CoreSimulator behavior from static simruntime into simdisk-based dynamic runtime. (If you search for xcrun simctl runtime match set 'watchos9.1' 20S75 you can check what I have been fighting for.)

At the end of numerous nightly overtimes I finally found out that ~/Library/Developer/CoreSimulator/RuntimeMap.plist is closely related to xcrun simctl runtime match command.

If CoreSimulatorService relaunches when RuntimeMap.plist is corrupted (or missing), Chosen Runtime will be set as default SDK (pretty sure it is SDK version of iphoneos, not iphonesimulator)

ex)

$ sudo xcode-select -s /Applications/Xcode_15.2.app

$ sed -i '' -e 's|21C62|21Cblabla|' ~/Library/Developer/CoreSimulator/RuntimeMap.plist

$ sudo pkill -9 com.apple.CoreSimulator.CoreSimulatorService

$ xcrun simctl runtime match list

== Evaluation Results ==
appletvos17.2:
    SDK Version: 17.2
    SDK Build: 21K354
    Platform: com.apple.platform.appletvos
    Chosen Runtime: tvOS 17.2 (17.2 - 21K364) - com.apple.CoreSimulator.SimRuntime.tvOS-17-2
        User Override: (null)
        Preferred: tvOS 17.2 (17.2 - 21K364) - com.apple.CoreSimulator.SimRuntime.tvOS-17-2
        Default: 21K354

iphoneos17.2:
    SDK Version: 17.2
    SDK Build: 21C52
    Platform: com.apple.platform.iphoneos
    Chosen Runtime: 21C52
        User Override: (null)
        Preferred: 21Cblabla
        Default: 21C52

watchos10.2:
    SDK Version: 10.2
    SDK Build: 21S355
    Platform: com.apple.platform.watchos
    Chosen Runtime: watchOS 10.2 (10.2 - 21S364) - com.apple.CoreSimulator.SimRuntime.watchOS-10-2
        User Override: (null)
        Preferred: watchOS 10.2 (10.2 - 21S364) - com.apple.CoreSimulator.SimRuntime.watchOS-10-2
        Default: 21S355

xros1.0:
    SDK Version: 1.0
    SDK Build: 21N301
    Platform: com.apple.platform.xros
    Chosen Runtime: visionOS 1.0 (1.0 - 21N305) - com.apple.CoreSimulator.SimRuntime.xrOS-1-0
        User Override: (null)
        Preferred: visionOS 1.0 (1.0 - 21N305) - com.apple.CoreSimulator.SimRuntime.xrOS-1-0
        Default: 21N301

The question is:

  1. Where exactly is the path or file that reflects this change? What file is Chosen Runtime of runtime match list tracking?
  2. When is the time to re-download and fix if it is corroded or not found?

P.S. Thanks valexeev4 for letting me know where RuntimeMap plist is. https://developer.apple.com/forums/thread/738077?answerId=765617022#765617022

Is there anyone who knows the secrets of RuntimeMap.plist?
 
 
Q