TwilioDevEd / twiliochat-swift

Swift implementation of Twilio Chat
https://www.twilio.com/docs/tutorials/walkthrough/ip-chat/ios/swift
MIT License
46 stars 18 forks source link

Delegate method "ChannelAdded" not called #14

Closed otymartin closed 7 years ago

otymartin commented 7 years ago

I can see logs in my xcode debug area whenever I successful invite a user but the delegate method recieves no callback. My implementation is the same as the example in this repo.. whats wrong?


extension MessagingManager: TwilioChatClientDelegate {

    func chatClient(_ client: TwilioChatClient!, channelAdded channel: TCHChannel!) {
        print("****CHANNEL ADDED")
        if channel.status == .invited {
            print("****invited wooooo")
        }
        self.delegate?.chatClient(client, channelAdded: channel)
    }
jefflinwood commented 7 years ago

Hi,

Was the issue that you don't see the print statements, or that the delegate on the MessagingManager never gets called?

Thanks! Jeff

otymartin commented 7 years ago

@jefflinwood the delegate wasnt called. problem was my synchronization stategy. only the all sync strategy will monitor channel events such as channel added. the channel list strategy doesnt do that

otymartin commented 7 years ago

This is now Fixed. The updated channelList sync strategy will now listen for channelAdded event.