12

I have two projects which both use JSQMessagesViewController, however in one of them I am getting the error: "Could not build Objective-C module 'JSQMessagesViewController'", whereas the other one works fine...There is virtually no difference between the two projects, how do I get JSQMessagesViewController to work because it is essential to my application. Thanks.

4
  • did you follow these instructions ? developer.apple.com/library/ios/documentation/Swift/Conceptual/… Commented Jun 28, 2016 at 12:40
  • I did not follow those...I just used cocoa pods to install the required dependencies. All other frameworks work except for this specific one. Commented Jun 28, 2016 at 12:42
  • you want to use objective-c module in swift right ? Commented Jun 28, 2016 at 12:43
  • Yes I do but I thought cocoapods would handle that all in the backend, I mean it worked with other frameworks like firebase and crashlytics... Commented Jun 28, 2016 at 12:44

2 Answers 2

45

I fixed the problem by going through the following steps:

  • Clean the project, including the build cache (Command-Option-Shift-K)
  • Removing the pod.lock file and the pods.xcodeproj files
  • And then closing Xcode and running pod update again
  • Then building again.
8
  • 3
    Side Note: Running Xcode 7.3.1 - Just cleaning the project and including the build cache solved the problem for me!
    – justColbs
    Commented Sep 2, 2016 at 15:16
  • When you say 'remove the pods.xcodeproj files' . Do you mean just remove the pods.xcodeproj file ? or remove it and all the other files located in the same directory ?
    – AziCode
    Commented Dec 29, 2016 at 1:58
  • 1
    @AziCode Hopefully you already figured it out but I meant just the pods.xcodeproj file Commented Jan 9, 2017 at 5:10
  • @AhadSheriff I am getting same problem in Xcode 8 and my code is written in Swift 2.3 I tried according to your answer , I could not get success.may you guide me little bit. Commented Mar 17, 2017 at 14:57
  • 1
    deleting .lock and .xcodeproj file will not harm to an existing project? Commented Jan 31, 2019 at 11:47
-1

try to install the latest version of JSQMessagesViewController which is on develop right now through (pod 'JSQMessagesViewController', :git => 'https://github.com/jessesquires/JSQMessagesViewController.git', :branch => 'develop') it worked for me ..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.