Short answer
With CocoaPods (including Flutter and React Native apps), close Xcode, run pod install in the ios folder, and open the .xcworkspace, not the .xcodeproj. With Swift Package Manager, check the package is added to this target under General, Frameworks, Libraries, and Embedded Content, then use File, Packages, Reset Package Caches. If it fails only for one scheme or for tests, add the dependency to that target too. Clearing DerivedData fixes stale builds after the rest is right.
Why Xcode can’t find the module, and the fix
01
The project file is open instead of the workspace
“Open the MyApp.xcworkspace that was created. This should be the file you use everyday to create your app.” CocoaPods, Using CocoaPods
CocoaPods builds the pods into a workspace that contains your project and the Pods project. Opening the .xcodeproj builds your app without the pods, so every pod import fails. Close it and open the .xcworkspace.
cd ios pod install open Runner.xcworkspace # Flutter; App.xcworkspace or YourApp.xcworkspace elsewhere02
Pods or packages were never installed
After cloning, switching branches or adding a Flutter or React Native package, the native dependencies must be installed again. Run flutter pub get or npm install first, then pod install in ios. For Swift packages, File, Packages, Resolve Package Versions.
# Flutter (No such module 'Flutter' or a plugin) flutter clean && flutter pub get cd ios && rm -f Podfile.lock && pod install --repo-update # React Native npm install && cd ios && pod install03
The dependency is not linked to this target
A Swift package or framework added to the app target is not visible to a widget, extension or test target. Add it to every target that imports it, or for pods, list the target in the Podfile.
# Podfile target 'Runner' do pod 'Alamofire' target 'RunnerTests' do inherit! :search_paths end end04
Stale build data
When everything is set up correctly and the error stays, clear the cached build: Product, Clean Build Folder, then delete DerivedData and build again.
rm -rf ~/Library/Developer/Xcode/DerivedData
Checked against the vendor’s docs on : CocoaPods: Using CocoaPods (open the .xcworkspace).
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
Related: Flutter “pod install” failed · Xcode “Command PhaseScriptExecution failed” · Xcode “Signing requires a development team” · Xcode provisioning profile invalid or expired