1

I installed CocoaPods by using $ sudo gem install cocoapods.

I have a swift Xcode project with the following podfile

platform :ios, '8.2'
use_frameworks!

target 'Clover' do

pod 'Alamofire', '~> 1.2'
pod 'SwiftyJSON', '~> 2.2'
pod 'ObjectMapper', '~> 0.12'
pod 'ImageLoader', '~> 0.3.0'
pod 'SVProgressHUD'

end

target 'CloverTests' do

end

After I run pod install, which seems to run correct with no error messages, I have a Pods folder generated with Pods.xcodeproject along with several other files.

However, when attempting to compile the project, I will into errors telling me my modules are not found. The error message is No such module followed by the module name.

I then attempted to install the modules manually and confirmed that the pods are indeed not working as each module after its manual installation, works.

I have searched and attempted several solutions as follows:

  1. Deleted and reinstall pod.
  2. Upgraded ruby to 2.2.1
  3. Delete the pods folder and re-run $ pods install.
  4. Clean the project.
Julian E.
  • 4,687
  • 6
  • 32
  • 49
Calvintwr
  • 8,308
  • 5
  • 28
  • 42

1 Answers1

6

More a comment than an answer, but I don't have enough reputation to comment:

When you use pod install with your-project.xcodeproject, it creates a new file/folder named your-project.xcodeworkspace (…project becomes …workspace) and this is this new file that you should open.

You didn't mention whether or not you knew that, so here you go: close the .xcodeproject in Xcode and open the .xcodeworkspace instead and it should work.

LaX
  • 453
  • 5
  • 16
  • this might just be the answer to many other similar issues. I know its obvious but there are people like me who are beginners and have not worked with workspace files before. Also, nowhere is it explicit states that CocoaPods create workspace files that are to be used. – Calvintwr Jun 12 '15 at 18:49