Fixing “Unsupported iOS SDK Mismatch” in Solar2d

If you are trying to build your Solar2d app for iOS and see a message like this:

iOS SDK Mismatch

then you have a version of Xcode (and therefore the iOS SDK) installed that doesn’t match what the Solar2d build tools are expecting.

  • If the version that you have installed is LOWER than the target version you should upgrade Xcode
  • If the version that you have installed is HIGHER than the target version then you may be OK by simply clicking “Yes” and proceeding with the build

If Solar2d will not build after clicking “Yes”, then your last option is downloading the version of Xcode that comes with the target iOS SDK version that you require. Start by determining what version of Xcode comes with the iOS SDK that you need by reading here: https://developer.apple.com/support/xcode/ For example, to install iOS SDK 17.0 you would want to download Xcode version 15.0.x (where x is the highest number you find in the downloads list below, in this case 15.0.1).

After you know what major and minor version of XCode you need, log in with your developer account to the download page: https://developer.apple.com/download/all/

Scroll down to or search for the version that you need and click to download it. This will place a large xip file in your downloads folder. When the download is complete, find the xip file and double-click to expand it. This will take a few minutes. The expanded file will simply be named “Xcode”, rename it to something like “Xcode-15.0.1” that corresponds to the version you downloaded. Move this file into your Applications folder.

Activate this version of Xcode by opening a terminal window and running a command like this:

sudo xcode-select -switch /Applications/Xcode-15.0.1.app

Now launch the version of Xcode that you downloaded by finding it in the Applications folder. When it starts up you will probably need to download and install the iOS SDK – make sure that it matches the version you were looking for.

After the iOS SDK is installed, restart the Solar2d launcher and then open your app. The iOS build dialog should proceed without a warning.

To later switch back to the version of Xcode that is installed from the Mac App Store, you can run this command:

sudo xcode-select -switch /Applications/Xcode.app