I keep getting the error
No Such Module 'Alamofire'
In my Xcode project swift file when using import Alamofire; the file is in a separate module within the project.
I have tried the following;
- Build and Run
AlamofireTarget - Comment out import
Alamofireand run project, then uncomment and build again - Make sure I am using the
<MyProject>.xcworkspacenot.xcodeproj Use
$(inherited)in project > Build Settings > Build Options > ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIESUpdate Cocoapods, remove and reinstall dependencies
However when I open the inspector window for the swift file, the Target Membership has both the main app and the module boxes ticked.
When I untick the module for which the file is within, then in my seperateModuleTests file I cannot use the classes used in the swift file, as I get the error;
Use of undeclared type
&&
Use of unresolved identifier 'ClassName'
It seems when I uncheck the target membership for the swift file for the class that is used for the tests, seperateModuleTests doesn't recognise the classes from the swift file. But when I check the the target membership for the swift file to be part of the separate module then I get the original error.
Can anybody help me on why this is happening and how I can resolve ?
