nativescript-xmpp
by Osei Fortune | v0.0.7
NativeScript XMPP Client
npm i --save nativescript-xmpp
  • Version: 0.0.7
  • GitHub:
  • Downloads:
    • Last Day:   0
    • Last Week:  8
    • Last Month: 11

npm npm Build Status

Nativescript XMPP

Installation

tns plugin add nativescript-xmpp

Usage

import { isIOS } from 'tns-core-modules/platform';
import { XMPP, Presence } from 'nativescript-xmpp';
const xmpp = new XMPP({
username: 'user',
password: 'password',
domain: 'localhost',
host: isIOS ? 'localhost' : '10.0.2.2'
});
xmpp.on('connected', args => {
xmpp.login();
});
xmpp.on('authenticated', (args: any) => {
const presence = new Presence();
presence.status = 'Nice';
xmpp.send(presence);
});
xmpp.connect();

License

Apache License Version 2.0, January 2004