Error "No such module" in Xcode: framework exists but cannot be imported
I'm a beginner in iOS development and encountered a strange problem. I have a Swift project, and I added a framework (e.g., Alamofire or Firebase) via CocoaPods, SPM, or just manually. The .framework file is in the project folder, it shows up in Build Phases -> Link Binary With Libraries, and the path is specified in Framework Search Paths. But when I write `import Alamofire` in my .swift file, Xcode gives an error: "No such module 'Alamofire'".
I've tried:
- Cleaning the project (Product -> Clean Build Folder)
- Deleting DerivedData
- Restarting Xcode and rebooting the computer
- Checking that the framework is actually added to the target (Build Phases)
- Checking that the framework is compiled for the correct architecture (arm64, x86_64)
The error still persists. Meanwhile, in O
No answers yet.
Log in to leave an answer
Blogs