func conversation(_ conversation: AVIMConversation, didReceiveUnread unread: Int)
这是接受未读消息的回调函数,我想在这个回调中执行
conversation.setValue(unread, forKey: "attributes.unread")
将未读消息数写到会话的自定义属性中,但是报错:
'NSUnknownKeyException', reason: '[<AVIMConversation 0x1700b4e80> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key attributes.unread.'
下面这句直接编译不过,提示 read-only
conversation.attributes?.updateValue(unread, forKey: "unread")
-
创建时间
16年12月14日
-
最后回复
16年12月16日
-
3
回复
-
941
浏览
-
2
用户