Fabian Vergara Fabian Vergara - 1 year ago 389
iOS Question

Can't use module I just install using cocoaPods (Swift)

I'm trying to use JSQMessagesViewController library but I can't seem to install it correctly... I can't import JSQMessagesViewController because Xcode tells me it doesn't exist.

I installed it using cocoa pods, the same way I installed Firebase and GoogleMaps... I can import and use those two, but it just doesn't work, somehow, with JSQMessages.

Any one has an idea why?

The error says "No such module 'JSQMessagesViewController'"

So I got it fixed.
If anyone want my pod file, it is the following:

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

Answer Source

In order to use CocoaPods written in Swift, you must explicitly include use_frameworks! to opt into using frameworks. If you forget to include this, and CocoaPods detects you’re trying to use a Swift CocoaPod,

for ex :

platform :ios, "9.0"

pod 'JSQMessagesViewController'

for more information see this tutorial

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download