0

My pods file:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'MyProject'
pod 'GoogleMaps'
pod 'Firebase'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'JSQMessagesViewController'

I am having the hardest time ever implementing this on my app. First, I installed pods (googlemaps, firebase and JSQMessagesVC), and the first two work just fine, however, JSQMVC does not. Xcode tells me that the module doesn't exist, or sometimes i tells me "could not build Objective-C module 'JSQMessagesViewController'"... and I just simply don't know what to do.

When I install pods, by "use frameworks!", according to google, it should just work... but it doesn't. I then tried implementing the bridging file, but then it tells me that no file exists (‪#‎import‬ "JSQMessages.h"), so I import the exact file path "#import "Pods/JSQMessagesViewController/JSQMessagesViewController/JSQMessages.h"" but then, JSQMessages.h imports also JSQMVC files that Xcode says they don't exist. They do. I tried to put manually the path for each file, but it still insists it doesn't exist...

There are two tutorials online using this framework in Swift... however, I am not getting it to work following none of them... maybe cuz they're too old? :@ this is really annoying.

I'm using Using JSQMessagesViewController (7.3.4) Using JSQSystemSoundPlayer (2.0.1) and pod --version 1.0.1

  • Possible duplicate of [How to import JSQMessagesViewController in swift?](http://stackoverflow.com/questions/29692448/how-to-import-jsqmessagesviewcontroller-in-swift) – excitedmicrobe Mar 27 '17 at 19:59

2 Answers2

1

I had also problems getting this work with pods, but for different reason than you, probably. I got some problems with other pods in my Podfile when I used "use frameworks".

What I did was to drag in the folder with the framework into Xcode, letting Xcode make a copy of it, and implement the bridging file. This works fine in my project.

Ivan C Myrvold
  • 680
  • 7
  • 23
1

Try changing second line of your podfile to platform :ios, '9.3' and then open terminal and navigate to your project directory. run pod update.

You also may want to delete your derived data. This is cached data on your computer that helps make launching your app quicker but can often cause issues in these situations. You can delete your derived data with the key board short cut command + option + Shift + k or by navigating through the menu Window>Projects and hitting the delete button on the window that pops up. Then run your project again it will take a min because it has to build from scratch.

Let me know if you run into more issues.

Dan Leonard
  • 3,325
  • 1
  • 20
  • 32