No such module iOS Origin: On your device Last updated 12 Oct 2026

Swift: No such module 'X' (module not found)

Xcode can’t find a Swift package, pod or framework you import.

Exact message you may see No such moduleerror: No such moduleModule not foundUnable to find module dependency
Seen on: iOS

Meaning

CocoaPods projects must be opened via .xcworkspace and built after pod install. Swift packages must be added to the target. Simulator/arch mismatches or a failed package resolution also cause it.

Common causes

  • Opened .xcodeproj instead of .xcworkspace (CocoaPods)
  • pod install / package resolution not run or failed
  • Framework not linked to this target
  • Build settings excluding the architecture

⚡ Quick fix

  1. Open the .xcworkspace and run pod install
  2. File → Packages → Reset Package Caches / Resolve Package Versions
  3. Add the package/framework to the target’s Frameworks

Detailed fix by platform

Shell

  1. swift
    pod install
    open MyApp.xcworkspace
    xcodebuild -resolvePackageDependencies

How to diagnose

  1. Workspace — Opened the right file?
  2. Target — Package in Frameworks, Libraries?
  3. Logs — Package resolution errors

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: On your device. Errors that are often confused with or caused by this one (click to open):

Cannot preview in this file — SwiftUI Preview: Cannot preview in this file — the preview crashed / failed to build (iOS)Cannot preview in thi…CocoaPods compatible versions — CocoaPods could not find compatible versions for pod (iOS)CocoaPods compatible …Failed to prepare device for development — Xcode: Failed to prepare device for development / iPhone is not available. Please reconnect the device (iOS)Failed to prepare dev…invalid active developer path — xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun (iOS)invalid active develo…is only available in iOS x or newer — Swift: 'X' is only available in iOS 16.0 or newer (iOS)is only available in …ITMS-90725 — ITMS-90725: SDK version issue — This app was built with the iOS 17.x SDK. All iOS apps submitted to the App Store must be built with the iOS 18 SDK or later (iOS)ITMS-90725library not found for -lPods — ld: library not found for -lPods-AppName / framework not found Pods_App (iOS)library not found for…Signing requires a development team — Signing for "App" requires a development team. Select a development team in the Signing & Capabilities editor (iOS)Signing requires a de…No such m…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.