Skip to main content

Resolving "Resource Class Not Available" Error for Xcode

Encountering the error message "Resource class macos for macos.m2.., image xcode:15.4.0 is not available for your project, or is not a valid resource class" indicates a compatibility issue between the selected resource class and Xcode version in your CircleCI configuration. This typically occurs when the chosen Xcode version is not supported by the specified resource class.

Prerequisites

  • Access to your CircleCI project configuration.

  • Familiarity with CircleCI's macOS resource classes and Xcode versions.

Solution

To resolve compatibility issues between Xcode versions and macOS resource classes, follow these steps:

  1. Verify Compatibility: Check which resource classes support your desired Xcode version. Each Xcode version is only available on certain resource classes. This mapping ensures optimal performance and compatibility. https://circleci.com/docs/guides/execution-managed/using-macos/#supported-xcode-versions

  2. Select a Compatible Resource Class: Choose a resource class from the available options that support your desired Xcode version. For example, if you are using Xcode 15.4.0, ensure you select a compatible resource class such as m4pro.medium, m4pro.large, m2pro.medium, m2pro.large, macos.m1.medium.gen1, or macos.m1.large.gen1.

  3. Update Your Configuration: Modify your CircleCI configuration to use the supported combination of Xcode version and resource class.

  4. jobs:
      build:
        macos:
          xcode: 15.4.0
        resource_class: m4pro.medium

Additional Resources

Did this answer your question?