rafitio
rafitio

Reputation: 568

Swift Error - Cannot load underlying module for 'MessageKit'

I've been trying to create a Chat Apps using MessageKit, but when creating the ViewController and import the MessageKit, I get an error as below

Cannot load underlying module for 'MessageKit'

this is my PodFile

platform :ios, '11.0'

target 'GanChat' do
use_frameworks!

pod 'Firebase/Core'
pod 'Firebase/Storage'
pod 'Firebase/Auth'
pod 'Firebase/Database'
pod 'MessageKit'

end

and this is my ViewController

import UIKit
import MessageKit

class ChatViewController: MessagesViewController {

override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup after loading the view, typically from a nib.
    senderId = "1234"
    senderDisplayName = "Heri"
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}
}

Upvotes: 1

Views: 950

Answers (1)

Louis Leung
Louis Leung

Reputation: 508

According to the OP, the fix for the issue was to clean the project with (Cmd + Shift + K) before building the project.

Upvotes: 1

Related Questions