Skip to content

Releases: qiscus/QiscusCore-iOS

0.2.16

11 May 06:26
Compare
Choose a tag to compare

-Fix crash NSError can't cast to NSString
-Fix first time calling multiple in new room and got new message API

0.3.1

26 Apr 06:28
Compare
Choose a tag to compare
  • Bug fix cannot room object after calling getRoom(withChannel) at the first-time call

0.2.15

26 Apr 08:54
Compare
Choose a tag to compare
  • Bug fix cannot room object after calling getRoom(withChannel) at the first-time call

0.3.0

08 Apr 08:54
Compare
Choose a tag to compare
  • Support Swift5
  • Improvement user online/offline

Note:
We still support swift 4.2, you can take 0.2.x version

0.2.14

02 Apr 08:36
Compare
Choose a tag to compare
  • improvement mqtt connection
  • improvement database message

0.2.13

26 Mar 04:25
Compare
Choose a tag to compare

-Bugfix update room
-Prevent crash when error 404

0.2.12

01 Mar 06:05
Compare
Choose a tag to compare

-improvement comment receipt
-improvement profile in local db

0.2.11

26 Feb 04:46
Compare
Choose a tag to compare

We change the mechanism again for subscribe, we hope it's can help user to easy use.
Just set QiscusCoreRoomDelegate for subscribe room, and set nil for unsubscribe

for example :

var chatRoomDelegate : QiscusCoreRoomDelegate? = nil

// set delegate in viewDidLoad or viewWillappear
override func viewDidLoad() {
        super.viewDidLoad()
        chatRoomDelegate = self
    }

override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        chatRoomDelegate = nil
    }

// MARK: Core Delegate
extension YourViewController : QiscusCoreRoomDelegate {
    func didDelete(Comment comment: CommentModel) {
       //
    }

    func onRoom(update room: RoomModel) {
        // 
    }

    func gotNewComment(comment: CommentModel) {
        // 2check comment already in ui?
    }

    func didComment(comment: CommentModel, changeStatus status: CommentStatus) {
        // check comment already exist in view
    }

    func onRoom(thisParticipant user: MemberModel, isTyping typing: Bool) {
       //
    }

    func onChangeUser(_ user: MemberModel, onlineStatus status: Bool, whenTime time: Date) {
        //
    }
}

and we add method for subscribe Typing in outside room,
for example subscribe typing :

for room in rooms {
  DispatchQueue.main.asyncAfter(deadline: .now()+1, execute: {
    QiscusCore.shared.subscribeTyping(roomID: room.id) { (roomTyping) in
       if let room = QiscusCore.database.room.find(id: roomTyping.roomID){
         //update you tableView cell
       }
    }
  })
}

for example unsubscribe typing :

 QiscusCore.shared.unsubscribeTyping(roomID: roomID)

note :
*We remove public method subscribeRoom, and unSubscribeRoom, please change it like example

0.2.10

19 Feb 10:14
Compare
Choose a tag to compare

Changelog :

  • fix avatarURL in message
  • implement feature api getUsers

example :

QiscusCore.shared.getUsers(limit: 20, page: page, querySearch: nil, onSuccess: { (contacts, metaData) in
            if (metaData.currentPage != self.page){
                self.page += 1
            }
        }) { (error) in
   
        }

0.2.9

12 Feb 11:25
Compare
Choose a tag to compare

Changelog:

  • Fix api getRoom with channel
  • Change mechanism Subscribe Room, after you load ChatRoom, please call method subscribe room

For Example :

 var chatRoomDelegate : QiscusCoreRoomDelegate? = nil

// set delegate in viewDidLoad
override func viewDidLoad() {
        super.viewDidLoad()
        chatRoomDelegate = self

        //getComment in room
        // you can implementation this in viewDidLoad or viewWillAppear
        QiscusCore.shared.getRoom(withID: _room.id, onSuccess: { [weak self] (room,comments) in
             QiscusCore.shared.subscribeRooms(rooms: [room])
             
        }) { [weak self] (error) in
             //error
        }
    }

override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
         //if you want to remove subscribe, you can call this method 
         QiscusCore.shared.unsubscribeRooms(rooms: [room])
    }

// MARK: Core Delegate
extension YourViewController : QiscusCoreRoomDelegate {
    func didDelete(Comment comment: CommentModel) {
       //
    }
    
    func onRoom(update room: RoomModel) {
        // 
    }
    
    func gotNewComment(comment: CommentModel) {
        // 2check comment already in ui?
    }
    
    func didComment(comment: CommentModel, changeStatus status: CommentStatus) {
        // check comment already exist in view
    }
    
    func onRoom(thisParticipant user: MemberModel, isTyping typing: Bool) {
       //
    }
    
    func onChangeUser(_ user: MemberModel, onlineStatus status: Bool, whenTime time: Date) {
        //
    }
}

*if you don't call method subscribeRoom(), realtime in chat room is not working, like updateRoom, message status (read & deliver), user online and user typing.