i cant register MucModule (#147)
Unknown opened 4 years ago

hi there: I'm trying Tigase's Xmpp service for the first time, and I have to say it's amazing. It's more powerful and easy to use than Smack and Xmppframework. but i have a problem, in your documentation , client register MucModule just need call init , like this:

 `client.modulesManager.register(MucModule())`

in TigaseSwift, XCode tell me i have to give a roomsManager:

 `client.modulesManager.register(MucModule(roomsManager:))`

and client's  connectionConfiguration have to setServerHost and setServerPort ,Otherwise, the link will fail.
Finally, I want to know which one means that the client has logged in successfully, whether the registration success or the verification success is successful.    
Can you answer me in as much detail as possible or update the document? Thank you very much``
Unknown commented 4 years ago

and client's connectionConfiguration have to setServerHost and setServerPort ,Otherwise, the link will fail.

It will fail without that if your server doesn't have proper DNS SRV records for client-to-server connections (SRV records for _xmpp-client._tcp.).

Yes, you need to use following method to create instance of MucModule:

  • for master branch MucModule(roomManager: DefaultRoomManager(store: DefautRoomStore()));
  • for stable branch as a parameter for roomsManager parameter of init() method you need to pass instance of DefaultRoomsManager which requires implementation of a RoomStore but due we do not provide default implementation of this class in this version of the library.

Finally, I want to know which one means that the client has logged in successfully, whether the registration success or the verification success is successful.

For registration, I would suggest to use AccountRegistrationTask which accepts in the init() method a callbacks for handling SSL validation, and registration results.

For checking when client logged in in master branch you need to observe state property of XMPPClient. For stable branch you need to observe events which are documented at https://docs.tigase.net/tigase-swift/master-snapshot/Tigase_Swift_Guide/html/#_simple_client_sending_message

Unknown commented 4 years ago

thank you very much , im in master branch ,but i cant find DefautRoomStore

Unknown commented 4 years ago
Unknown commented 4 years ago

i find it , Obviously, this is the Xcode problem,I have compared the stable and master branches. They are very different. Do you recommend the stable version

Unknown commented 4 years ago

Stable version it the version which is used by stable versions of SiskinIM and BeagleIM. But new versions of those clients will use version of the library from the master branch. Moreover, stable branch is no longer being developed.

Unknown commented 4 years ago

Our server uses tigase's very old redevelopment version. I want to know whether there will be incompatibility if I use master. Previously, I used smack open source framework in Android development, but I found that there seems to be incompatibility between tigase and the packages sent in smack. So now I consider replacing IOS and android with tigase open source libraries, I'm really in a dilemma now

issue 1 of 1
Issue Votes (0)
Watchers (0)
Reference
tigase/_libraries/Martin#147
Please wait...
Page is in error, reload to recover