tns plugin add nativescript-applozic-chat [NOT PUBLISHED YET]Goto src folder and run
npm run demo.ios
var alUser = {
'userId' : userId, //Replace it with the userId of the logged in user
'password' : password, //Put password here
'authenticationTypeId' : 1,
'applicationId' : 'applozic-sample-app', //replace "applozic-sample-app" with Application Key from Applozic Dashboard
'deviceApnsType' : 0 //Set 0 for Development and 1 for Distribution (Release)
};
applozicChat.login(alUser, function(response) {
applozicChat.launchChat(); //launch chat
}, function(error) {
console.log("onLoginFailure: " + error);
}); applozicChat.launchChat();
applozicChat.launchChatWithUserId(userId);
applozicChat.launchChatWithGroupId(groupId);
applozicChat.logout(function(response) {
console.log("logout success: " + response);
}, function(error) {
console.log("logout error: "+ error);
});