Last active
October 26, 2023 17:57
-
-
Save erikkerber/630e00c1afebd3ef6881a60a22e2e15b to your computer and use it in GitHub Desktop.
Bug with simctl list devices --json with duplicate sim runtime identifiers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
xcrun simctl delete all | |
DEVELOPER_DIR=/Applications/Xcode-15.0.0.app/Contents/Developer xcrun simctl create "Made with Xcode 15" "iPhone 15 Pro" "com.apple.CoreSimulator.SimRuntime.iOS-17-0" | |
set +x; echo -e "\n\n+++++++++++++++++++++ Device shows up with Xcode 15.0.0 +++++++++++++++++++++++++++++++"; set -x | |
# Shows the newly created simulator | |
DEVELOPER_DIR=/Applications/Xcode-15.0.0.app/Contents/Developer xcrun simctl list devices | |
set +x; echo -e "\n\n+++++++++++++++++++++ Xcode 15.0.0 +++++++++++++++++++++++++++++++"; set -x | |
# The json output appears to "squash" the `com.apple.CoreSimulator.SimRuntime.iOS-17-0` key: | |
DEVELOPER_DIR=/Applications/Xcode-15.0.0.app/Contents/Developer xcrun simctl list devices -j | |
set +x; echo -e "\n\n+++++++++++++++++++++ Xcode 15.0.1 +++++++++++++++++++++++++++++++"; set -x | |
# If you use the newest Xcode, it appears to give the newer runtime precedent and will appear in the JSON output | |
DEVELOPER_DIR=/Applications/Xcode-15.0.1.app/Contents/Developer xcrun simctl list devices -j |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Without disambiguation between the 17.0.0 and 17.0.1 runtimes (both share a runtime ID of
com.apple.CoreSimulator.SimRuntime.iOS-17-0
), bothsimctl create
and the--json
output when listing devices show bugs or inconsistencies.