Xcode-beta project ORSOFINAL: SwiftShims & C99 PCH errors after migration from Xcode stable

Hi all,

I’m running into a persistent build issue with my Swift project ORSOFINAL after migrating from Xcode stable to Xcode-beta.app (June 2025 version).

💥 Errors displayed: 1. C99 was enabled in PCH file but is currently disabled 2.

module file .../ModuleCache.noindex/SwiftShims-AXUM98L131W4...pcm cannot be loaded due to a configuration mismatch with the current compilation

3.	missing required module 'SwiftShims'

🛠 What I’ve already tried: • xcode-select -s /Applications/Xcode-beta.app/Contents/Developer • Deleted ~/Library/Developer/Xcode/DerivedData, ModuleCache.noindex, Archives, and Products • Ran sudo xcodebuild -runFirstLaunch • Clean Build Folder in Xcode-beta • Verified Command Line Tools setting points to Xcode-beta

❓Looking for guidance on: • Whether this is a known bug in Xcode-beta • If SwiftShims/PCM conflicts are expected between versions • Best practices to safely migrate from Xcode stable to beta for Swift-based projects

Any advice is much appreciated.

Thanks, Mathéo

Hi Mathéo,

This appears to be a classic issue that can occur when migrating to a new major Xcode beta, particularly when Swift compiler internals (such as SwiftShims) or PCH configurations change between versions.

Here are a few suggestions that may help:

  1. Double-check C99 mode
  • Try explicitly setting the * GCC_C_LANGUAGE_STANDARD * to * gnu99 * or * gnu11 * in your target’s Build Settings to ensure compatibility with any residual PCH references.
  1. Remove old PCH references
  • Even though you cleared DerivedData and ModuleCache, some * .pch * files may be retained in * ~/Library/Developer/Xcode/PrecompiledHeaders/. * Try deleting that directory too, and restarting Xcode-beta.

3.SwiftShims missing module

  • This can occur if Swift module interfaces are incompatible across versions. Make sure there are no leftovers. * .swiftmodule * files in your project directory or Carthage/CocoaPods builds that may have been compiled using the previous stable Xcode.

If you’re using a 3rd-party dependency manager, clean & rebuild from scratch with Xcode-beta.

Hope it helps!

Accepted Answer

so best option was to use clean my Mac and delete ALL Mac cashes. Also delete all Xcode cashes using clean my Mac, and to sudo purge the Mac using terminal and boost performance by cleaning is using clean my Mac.

Xcode-beta project ORSOFINAL: SwiftShims & C99 PCH errors after migration from Xcode stable
 
 
Q