2

I'm using Mesibo chat framework/SDK for chat integration in my application with my own UI Designs but I'm not able to send or receive the messages from the server. Also, the connection status is showing 9 at last.

I'm using Swift 5 language for development and all the demos are written in Objective c so please help me regarding this.

This is my didFinishDidLaunch Method:

 Mesibo.getInstance()?.addListener(self)
 Mesibo.getInstance()?.setAccessToken("user_token")
 Mesibo.getInstance()?.setSecureConnection(true)
 Mesibo.getInstance()?.start()

Here are my delegates methods:

func mesibo_(onConnectionStatus status: Int32) {
    print("Connection status: %d", status);

}

func mesibo_(onMessageStatus params: MesiboParams!) {
    print(params ?? "")
}

func mesibo_(onMessage params: MesiboParams!, data: Data!) {
    print("data")
}

Please share if any demo was available for swift 5 or swift 4.2.

Thanks in advance.

Satish Thakur
  • 184
  • 1
  • 14

2 Answers2

1

The Mesibo.h shows the following connection status values:

#define MESIBO_STATUS_UNKNOWN            0
#define MESIBO_STATUS_ONLINE            1
#define MESIBO_STATUS_OFFLINE           2
#define MESIBO_STATUS_SIGNOUT           3
#define MESIBO_STATUS_AUTHFAIL          4
#define MESIBO_STATUS_STOPPED           5
#define MESIBO_STATUS_CONNECTING        6
#define MESIBO_STATUS_CONNECTFAILURE    7
#define MESIBO_STATUS_NONETWORK         8
#define MESIBO_STATUS_MANDUPDATE        10
#define MESIBO_STATUS_SHUTDOWN          20
#define MESIBO_STATUS_ACTIVITY          -1

I don't know what 9 is, but you want a 1.

When creating your user, note that you have to include your app's bundle id.

For example:

GET https://api.mesibo.com/api.php?op=useradd&token=TOKEN&addr=USER&appid=BUNDLE_ID

(Replace TOKEN, USER and BUNDLE_ID with actual values.)

Jason Moore
  • 7,169
  • 1
  • 44
  • 45
0

Turn off the On-Premise Hosting in your mesibo Account.

enter image description here

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54