![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
sg-react-native-xmpp
Advanced tools
An XMPP library for React Native.
A simple interface for native XMPP communication. Both iOS and Android are supported.
XmppDemo uses a Flux approach (check its XmppStore
) to communicate with a sample XMPP server, where 4 accounts were registered.
var XMPP = require('react-native-xmpp');
// optional callbacks
XMPP.on('message', (message) => console.log('MESSAGE:' + JSON.stringify(message)));
XMPP.on('iq', (message) => console.log('IQ:' + JSON.stringify(message)));
XMPP.on('presence', (message) => console.log('PRESENCE:' + JSON.stringify(message)));
XMPP.on('error', (message) => console.log('ERROR:' + message));
XMPP.on('loginError', (message) => console.log('LOGIN ERROR:' + message));
XMPP.on('login', (message) => console.log('LOGGED!'));
XMPP.on('connect', (message) => console.log('CONNECTED!'));
XMPP.on('disconnect', (message) => console.log('DISCONNECTED!'));
// trustHosts (ignore self-signed SSL issues)
// Warning: Do not use this in production (security will be compromised).
XMPP.trustHosts(['chat.google.com']);
// connect
XMPP.connect(MYJID, MYPASSWORD);
// send message
XMPP.message('Hello world!', TOJID);
// disconnect
XMPP.disconnect();
// remove all event listeners (recommended on componentWillUnmount)
XMPP.removeListeners();
// remove specific event listener (type can be 'message', 'iq', etc.)
XMPP.removeListener(TYPE);
npm install react-native-xmpp --save
rnpm link react-native-xmpp
In the Xcode project navigator, select your project, select the Build Phases
tab and in the Link Binary With Libraries
section add, libRNXMPP.a
, libresolv
and libxml2
.
If rnpm doesn't link the react-native-xmpp correct:
android/settings.gradle
include ':react-native-xmpp'
project(':react-native-xmpp').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-xmpp/android')
android/app/build.gradle
dependencies {
...
compile project(':react-native-xmpp')
}
MainApplication.java
On top, where imports are:
import rnxmpp.RNXMPPPackage;
Add the ReactVideoPackage
class to your list of exported packages.
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new RNXMPPPackage()
);
}
FAQs
XMPP Library for React Native
We found that sg-react-native-xmpp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.