Closed schwarja closed 4 years ago
@danpecher please test this and approve or reject it
@schwarja I tested this and the installation and build is OK but for some reason when I try to use ChatCore
like this
let core = ChatCore<ChatNetworkFirebase, ChatModelsUI>(
networking: ChatNetworkFirebase(
config: ChatNetworkFirebase.Config(configUrl: "...", userId: "...")
)
)
I get an error
Type 'ConversationFirestore' does not conform to protocol 'ChatUIConvertible'
Maybe I'm doing something wrong 🤔
@danpecher I probably know why it doesn't work for you. We have 3 layers ChatNetworkingFirestore
, ChatCore
and ChatUI
. These 3 layers are connected together in Chat
framework that also implements the conformance to ChatUIConvertible
and ChatNetworkingConvertible
. So if you type:
import Chat
let chat = Chat(configuration: ...)
it should work just fine. It should be also fine if you use your piece of code and you import also Chat because the conformance is defined there.
Generally speaking, if you instantiate ChatCore
on your own you need to implement also the conformance to those *Convertible
protocols on your own. But you don't need to instantiate Core
separately because Chat
provides you with a complete solution.
@schwarja you're right, importing Chat
module solves it 🙂