rahul garg rahul garg - 1 year ago 120
iOS Question

Atlas: Type does not conform to protocol ATLParticipant

I am trying to integrate Layer alongwith Atlas into my project. I am working on Swift 2.2. I have made a swift class which should conform to ATLParticipant protocol but Xcode is throwing an error,

Type 'ConversationParticipant' does not conform to protocol 'ATLParticipant'

I don't understand what I am doing wrong. The code is:

import Atlas
import Foundation

class ConversationParticipant: NSObject, ATLParticipant {
var firstName: String
var lastName: String
var fullName: String?
var participantIdentifier: String?

var avatarImageURL: NSURL?
var avatarImage: UIImage?
var avatarInitials: String?

override init() {

Any help would be appreciated..

Answer Source

You are missing the displayName and userID Strings. You need to provide them because the protocol requires it.

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