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.

Ahad Sheriff
  • 1,829
  • 8
  • 24
  • 46
  • did you follow these instructions ? https://developer.apple.com/library/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html – Umair Afzal Jun 28 '16 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. – Ahad Sheriff Jun 28 '16 at 12:42
  • you want to use objective-c module in swift right ? – Umair Afzal Jun 28 '16 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... – Ahad Sheriff Jun 28 '16 at 12:44

2 Answers2

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.
Ahad Sheriff
  • 1,829
  • 8
  • 24
  • 46
-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 ..

Sa Yef
  • 1