Error running `xcrun simctl list devices --json`: You may need to run sudo xcode-select -s /Applications/Xcode.app and try again. m1 macbook code example
Example: error running `xcrun simctl list devices --json`: you may need to run sudo xcode-select -s /applications/xcode.app and try again.
What worked for me was uninstalling Carthage and installing it again.
brew uninstall carthage --force
brew install carthage