Coder Social home page Coder Social logo

aksonov / react-native-xmpp Goto Github PK

View Code? Open in Web Editor NEW
305.0 18.0 96.0 520 KB

XMPP library for React Native (iOS and Android native support)

License: BSD 2-Clause "Simplified" License

Objective-C 43.98% JavaScript 20.47% Java 32.43% Python 2.01% Ruby 1.11%

react-native-xmpp's Introduction

react-native-xmpp

An XMPP library for React Native.

A simple interface for native XMPP communication. Both iOS and Android are supported.

Demo

XmppDemo uses a Flux approach (check its XmppStore) to communicate with a sample XMPP server, where 4 accounts were registered.

demo-3

Example

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);

Getting started

  1. npm install react-native-xmpp --save

iOS

Please use CocoaPods

  1. Install latest XMPPFramework: https://github.com/robbiehanson/XMPPFramework pod 'XMPPFramework', :git => 'https://github.com/robbiehanson/XMPPFramework.git', :branch => 'master'

  2. Add this package pod: pod 'RNXMPP', :path => '../node_modules/react-native-xmpp'

If you have problems with latest 4.0 XMPPFramework and/or XCode 9.3, you may use old one with forked KissXML: pod 'XMPPFramework', '~> 3.7.0' pod 'KissXML', :git => "https://github.com/aksonov/KissXML.git", :branch => '5.1.4'

Android

react-native link react-native-xmpp

If it 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()
    );
}

react-native-xmpp's People

Contributors

aksonov avatar dragulceo avatar faogustavo avatar froelund avatar hhravn avatar hiep95 avatar jayprado avatar jlbfalcao avatar tpedersen123 avatar vigasdeep avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-xmpp's Issues

upgrade smack to 4.2

Smack 4.1 seems old, it was released last 2015, they have a new 4.2 stable version which was just released last March.

I don't seem to see any changes in the API that is used in the android rn lib. Although my understanding of android is only basic so feel free to check.

I could create a simple PR to for this and test but that's it.

Error when require('react-native-xmpp') on android project

I already installed react-native-xmpp on my react native project by npm command npm install --save react-native-xmpp and link it with rnpm link react-native-xmpp.
When I want to require this module by typing this var XMPP = require('react-native-xmpp'); to index.android.js I got an error:

undefined is not an object (evaluating 'RNXMPP.PLAIN')

Why I get this error? and how to use react-native-xmpp on android project?

Cannot read property 'PLAIN' of undefined in IOS

The code is working fine on android. But in IOS simulator it shows some exception like :-

ExceptionsManager.js:62 Cannot read property 'PLAIN' of undefinedhandleException
@ ExceptionsManager.js:62handleError
@ InitializeJavaScriptAppEngine.js:120reportFatalError
@ error-guard.js:30guardedLoadModule
@ require.js:60_require
@ require.js:49(anonymous function)
@ require-0.js:1executeApplicationScript
@ debuggerWorker.js:20onmessage
@ debuggerWorker.js:38

java.net.ConnectException : bad file descriptor

When I try to connect to my XMPP server, it gives the following error

react-native-xmpp: Error: The following addresses failed: 'mydomain.com:5222' failed because java.net.ConnectException: Bad file descriptor
where mydomain.com is dummy in this comment

But when I connect from Pidgin to the same server and everything works fine.
What might the problem?

Parser error on Contacts query result

When trying to parse

<iq from='[email protected]' to='[email protected]/Smack' id='5vZER-55' type='result'><query xmlns='jabber:iq:roster'><item subscription='none' name='mee' jid='[email protected]'><group>Contacts</group></item><item subscription='from' jid='[email protected]'/><item ask='subscribe' subscription='none' jid='hhravn@ott'><group>Contacts</group></item></query></iq>

the following exception is logged

E/AbstractXMPPConnection(10815): Exception in async packet listener
E/AbstractXMPPConnection(10815): java.lang.IllegalArgumentException: Unknown array type class com.facebook.react.bridge.ReadableNativeArray
E/AbstractXMPPConnection(10815): at com.facebook.react.bridge.Arguments.fromArray(Arguments.java:99)
E/AbstractXMPPConnection(10815): at rnxmpp.utils.Parser.parse(Parser.java:69)
E/AbstractXMPPConnection(10815): at rnxmpp.utils.Parser.parse(Parser.java:77)
E/AbstractXMPPConnection(10815): at rnxmpp.utils.Parser.parse(Parser.java:39)
E/AbstractXMPPConnection(10815): at rnxmpp.service.RNXMPPCommunicationBridge.onIQ(RNXMPPCommunicationBridge.java:64)
E/AbstractXMPPConnection(10815): at rnxmpp.service.XmppServiceSmackImpl.processPacket(XmppServiceSmackImpl.java:165)
E/AbstractXMPPConnection(10815): at org.jivesoftware.smack.AbstractXMPPConnection$3.run(AbstractXMPPConnection.java:1096)
E/AbstractXMPPConnection(10815): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/AbstractXMPPConnection(10815): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/AbstractXMPPConnection(10815): at java.lang.Thread.run(Thread.java:818)

Error when trying to start the react-native package server

When executing "react-native start" inside XmppDemo, I end up with this error:

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: spawn sh ENOENT
    at exports._errnoException (util.js:873:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:442:9)
    at process._tickCallback (node.js:356:17)
    at Function.Module.runMain (module.js:443:11)
    at startup (node.js:139:18)
    at node.js:968:3

other react-native projects are just working fine so it doesn't seem to be an issue with my react-native installation but rather an issue with this specific project.

Lumberjack conflicting

Hey man, I am trying to integrate the lib on my app but the lumberjack is conflicting with react-native-background-geolocation library. I did some studies before and it worked really fine but now on the real project its not working.
Can you give me some help?

Error Message:

duplicate symbol _OBJC_IVAR_$_DDMultiFormatter._formatters in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDMultiFormatter.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDMultiFormatter.o)
duplicate symbol _OBJC_CLASS_$_DDMultiFormatter in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDMultiFormatter.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDMultiFormatter.o)
duplicate symbol _OBJC_METACLASS_$_DDMultiFormatter in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDMultiFormatter.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDMultiFormatter.o)
duplicate symbol _OBJC_IVAR_$_DDMultiFormatter._queue in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDMultiFormatter.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDMultiFormatter.o)
duplicate symbol _OBJC_CLASS_$_DDLoggingContextSet in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDContextFilterLogFormatter.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDContextFilterLogFormatter.o)
duplicate symbol _OBJC_METACLASS_$_DDLoggingContextSet in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDContextFilterLogFormatter.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDContextFilterLogFormatter.o)
duplicate symbol _OBJC_CLASS_$_DDContextBlacklistFilterLogFormatter in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDContextFilterLogFormatter.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDContextFilterLogFormatter.o)
duplicate symbol _OBJC_METACLASS_$_DDContextBlacklistFilterLogFormatter in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDContextFilterLogFormatter.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDContextFilterLogFormatter.o)
duplicate symbol _OBJC_CLASS_$_DDContextWhitelistFilterLogFormatter in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDContextFilterLogFormatter.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDContextFilterLogFormatter.o)
duplicate symbol _OBJC_METACLASS_$_DDContextWhitelistFilterLogFormatter in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDContextFilterLogFormatter.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDContextFilterLogFormatter.o)
duplicate symbol _OBJC_CLASS_$_DDASLLogger in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDASLLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDASLLogger.o)
duplicate symbol _OBJC_METACLASS_$_DDASLLogger in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDASLLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDASLLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.fgCodeIndex in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.bgCodeIndex in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.fgCodeRaw in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.bgCodeRaw in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.context in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_CLASS_$_DDTTYLogger in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_METACLASS_$_DDTTYLogger in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.fg_r in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.bg_r in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.resetCodeLen in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.fgCodeLen in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.bgCodeLen in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.mask in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.fg_g in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.bg_g in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_CLASS_$_DDTTYLoggerColorProfile in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_METACLASS_$_DDTTYLoggerColorProfile in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.resetCode in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.fgCode in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.bgCode in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.fg_b in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDTTYLoggerColorProfile.bg_b in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDTTYLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDTTYLogger.o)
duplicate symbol _OBJC_IVAR_$_DDLogFileManagerDefault._logsDirectory in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDFileLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDFileLogger.o)
duplicate symbol _OBJC_CLASS_$_DDLogFileFormatterDefault in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDFileLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDFileLogger.o)
duplicate symbol _OBJC_METACLASS_$_DDLogFileFormatterDefault in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDFileLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDFileLogger.o)
duplicate symbol _OBJC_CLASS_$_DDLogFileManagerDefault in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDFileLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDFileLogger.o)
duplicate symbol _OBJC_METACLASS_$_DDLogFileManagerDefault in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDFileLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDFileLogger.o)
duplicate symbol _OBJC_CLASS_$_DDFileLogger in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDFileLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDFileLogger.o)
duplicate symbol _OBJC_METACLASS_$_DDFileLogger in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDFileLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDFileLogger.o)
duplicate symbol _OBJC_IVAR_$_DDFileLogger.logFileManager in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDFileLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDFileLogger.o)
duplicate symbol _OBJC_CLASS_$_DDLogFileInfo in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDFileLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDFileLogger.o)
duplicate symbol _OBJC_METACLASS_$_DDLogFileInfo in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDFileLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDFileLogger.o)
duplicate symbol _OBJC_IVAR_$_DDLogFileInfo.filePath in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDFileLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDFileLogger.o)
duplicate symbol _doesAppRunInBackground in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDFileLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDFileLogger.o)
duplicate symbol _OBJC_CLASS_$_DDAbstractLogger in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDLog.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDLog.o)
duplicate symbol _OBJC_METACLASS_$_DDAbstractLogger in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDLog.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDLog.o)
duplicate symbol _DDExtractFileNameWithoutExtension in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDLog.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDLog.o)
duplicate symbol _OBJC_CLASS_$_DDLog in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDLog.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDLog.o)
duplicate symbol _OBJC_METACLASS_$_DDLog in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDLog.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDLog.o)
duplicate symbol _OBJC_CLASS_$_DDLogMessage in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDLog.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDLog.o)
duplicate symbol _OBJC_METACLASS_$_DDLogMessage in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDLog.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDLog.o)
duplicate symbol _OBJC_CLASS_$_DDLoggerNode in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDLog.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDLog.o)
duplicate symbol _OBJC_METACLASS_$_DDLoggerNode in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDLog.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDLog.o)
duplicate symbol _OBJC_CLASS_$_DDAbstractDatabaseLogger in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDAbstractDatabaseLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDAbstractDatabaseLogger.o)
duplicate symbol _OBJC_METACLASS_$_DDAbstractDatabaseLogger in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDAbstractDatabaseLogger.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDAbstractDatabaseLogger.o)
duplicate symbol _OBJC_IVAR_$_DDDispatchQueueLogFormatter._replacements in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDDispatchQueueLogFormatter.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDDispatchQueueLogFormatter.o)
duplicate symbol _OBJC_CLASS_$_DDDispatchQueueLogFormatter in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDDispatchQueueLogFormatter.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDDispatchQueueLogFormatter.o)
duplicate symbol _OBJC_METACLASS_$_DDDispatchQueueLogFormatter in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDDispatchQueueLogFormatter.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDDispatchQueueLogFormatter.o)
duplicate symbol _OBJC_IVAR_$_DDDispatchQueueLogFormatter._maxQueueLength in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDDispatchQueueLogFormatter.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDDispatchQueueLogFormatter.o)
duplicate symbol _OBJC_IVAR_$_DDDispatchQueueLogFormatter._minQueueLength in:
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libRNXMPP.a(DDDispatchQueueLogFormatter.o)
    /Users/syntesismobile/Library/Developer/Xcode/DerivedData/SynsuiteReact-fbyihysvdkkelicgayundocotvgr/Build/Products/Debug-iphonesimulator/libCocoaLumberjack.a(DDDispatchQueueLogFormatter.o)
ld: 62 duplicate symbols for architecture x86_64

Android build failure :react-native-xmpp:compileReleaseJavaWithJavac

Hey, I installed react-native-xmpp as described and linked Binarys with 'rnpm link react-native-xmpp'
and extra linking for ios in XCode -> Ios is working.

Building the Android Version I get this error:

:react-native-xmpp:compileReleaseJavaWithJavac
:react-native-xmpp:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
...APP/node_modules/react-native-xmpp/android/src/main/java/rnxmpp/RNXMPPPackage.java:28: error: method does not override or implement a method from a supertype
    @Override
    ^
Note: ...APP/node_modules/react-native-xmpp/android/src/main/java/rnxmpp/service/XmppServiceSmackImpl.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
:react-native-xmpp:compileReleaseJavaWithJavac FAILED

Node Version7.7.4 , installed everything with yarn.
Any idea how to fix this? Did I miss a linking Step?
Thanks alot!

Edit: I get this WARNUNG, same thing was fixed and closed in #55

WARNING: WARNING: Dependency xpp3:xpp3:1.1.4c is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages

How to chat multi device

i have > 2 device login with one account.
But onReceiveMessage method not working in all device/
please help me.

Cannot generate demo

Hi,

Sorry for this question. Can someone guide me how to generate this demo?

Highly appreciated

iOS not acknowledging messages received.

Is there a reason why iOS doesn't acknowledge that messages has been received?

When I send messages to Android, they get received and if I close the app the server shows the messages have been received without issues. When I send messages to iOS though, the messages are received and displayed on the phone, the problem is when I close the app, the server tries to send the messages again even though they have already been received, it shows that they haven't been processed yet. Is there a reason iOS doesn't acknowledge that it has received the messages already?

[Android] Support for different SASLMechanism

Hi, i have encountered some problem on android side. My Servers authenticate with PLAIN SASLMechanism, but library does not support it, and dont use authMethod parameter.

And what i have found SecurityMode is always required, which is not always good. I could do PR for this.

IOS rnpm link or react-native link are not working

I run the project successfully in android but in IOS when I linked (by rnpm or react-native link) XmppDemo.xcodeprog added to project , even after adding RNXMPP.xcodeprog manually and adding those files in binary link the build is failed and all the folders in XMPP framework (like vendor, core , ... ) are empty.

react-native : 0.49.5
xmpp : 0.6.0

How to join a room?

Now I can connect the server, send message fro another account.
If I want to join a chat room, chat with multi-users, how to implement?
Does the library support?
If yes, which API should use?

Thanks

Dependency Analysis Error in XCode 9.2

On IOS when i build my app ; I'm facing a dependency analysis error resulting in a build failure.

Could not determine generated file paths for Core Data code generation: Error Domain=com.apple.dt.ModelingTools Code=1 "Error, failed to read Core Data data model from /Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/XEP-0115/CoreDataStorage/XMPPCapabilities.xcdatamodel: unknown model format" UserInfo={NSFilePath=/Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/XEP-0115/CoreDataStorage/XMPPCapabilities.xcdatamodel, NSLocalizedDescription=Error, failed to read Core Data data model from /Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/XEP-0115/CoreDataStorage/XMPPCapabilities.xcdatamodel: unknown model format}
Could not determine generated file paths for Core Data code generation: Error Domain=com.apple.dt.ModelingTools Code=1 "Error, failed to read Core Data data model from /Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/Roster/CoreDataStorage/XMPPRoster.xcdatamodel: unknown model format" UserInfo={NSFilePath=/Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/Roster/CoreDataStorage/XMPPRoster.xcdatamodel, NSLocalizedDescription=Error, failed to read Core Data data model from /Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/Roster/CoreDataStorage/XMPPRoster.xcdatamodel: unknown model format}
Could not determine generated file paths for Core Data code generation: Error Domain=NSCocoaErrorDomain Code=260 "No current version for model at path /Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/XEP-0054/CoreDataStorage/XMPPvCard.xcdatamodeld:" UserInfo={NSFilePath=/Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/XEP-0054/CoreDataStorage/XMPPvCard.xcdatamodeld, NSLocalizedDescription=No current version for model at path /Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/XEP-0054/CoreDataStorage/XMPPvCard.xcdatamodeld:}
Could not determine generated file paths for Core Data code generation: Error Domain=NSCocoaErrorDomain Code=260 "No current version for model at path /Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/XEP-0045/HybridStorage/XMPPRoomHybrid.xcdatamodeld:" UserInfo={NSFilePath=/Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/XEP-0045/HybridStorage/XMPPRoomHybrid.xcdatamodeld, NSLocalizedDescription=No current version for model at path /Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/XEP-0045/HybridStorage/XMPPRoomHybrid.xcdatamodeld:}
Could not determine generated file paths for Core Data code generation: Error Domain=NSCocoaErrorDomain Code=260 "No current version for model at path /Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/XEP-0136/CoreDataStorage/XMPPMessageArchiving.xcdatamodeld:" UserInfo={NSFilePath=/Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/XEP-0136/CoreDataStorage/XMPPMessageArchiving.xcdatamodeld, NSLocalizedDescription=No current version for model at path /Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/XEP-0136/CoreDataStorage/XMPPMessageArchiving.xcdatamodeld:}
Could not determine generated file paths for Core Data code generation: Error Domain=NSCocoaErrorDomain Code=260 "No current version for model at path /Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/XEP-0045/CoreDataStorage/XMPPRoom.xcdatamodeld:" UserInfo={NSFilePath=/Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/XEP-0045/CoreDataStorage/XMPPRoom.xcdatamodeld, NSLocalizedDescription=No current version for model at path /Users/agruet/mobile-dev/react-projects/goer/node_modules/react-native-xmpp/XMPPFramework/Extensions/XEP-0045/CoreDataStorage/XMPPRoom.xcdatamodeld:}

I followed the instructions (Linking libs etc.)

react-native : 0.52
Xcode: 9.2

Please advice.

trust hosts security

How is security compromised even if you have an ssl xmpp server? Were using trust hosts at the moment since it gives us an error without that.

xmpp java.security.KeyStoreException: java.security.NoSuchAlgorithmException: KeyStore jks implementation not found

Android version should connect asynchronously.

When connecting on android device, the connect function does not return before the connection is made, and the login is done.

It should return as soon as the connection is configured, and a and the actual making connection has been submitted to a thread.

run android demo and to login get error:

04-19 22:24:48.031 7891-10210/com.xmppdemo W/AbstractXMPPConnection: Connection closed with error
javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:328)
at com.android.org.conscrypt.OpenSSLSocketImpl.waitForHandshake(OpenSSLSocketImpl.java:629)
at com.android.org.conscrypt.OpenSSLSocketImpl.getInputStream(OpenSSLSocketImpl.java:591)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.initReaderAndWriter(XMPPTCPConnection.java:642)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.proceedTLSReceived(XMPPTCPConnection.java:742)
at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$900(XMPPTCPConnection.java:139)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1003)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$200(XMPPTCPConnection.java:937)
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:952)
at java.lang.Thread.run(Thread.java:833)
Caused by: java.security.cert.CertificateException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:324)
at com.android.org.conscrypt.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:225)
at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:115)
at com.android.org.conscrypt.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:556)
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:324)
at com.android.org.conscrypt.OpenSSLSocketImpl.waitForHandshake(OpenSSLSocketImpl.java:629) 
at com.android.org.conscrypt.OpenSSLSocketImpl.getInputStream(OpenSSLSocketImpl.java:591) 
at org.jivesoftware.smack.tcp.XMPPTCPConnection.initReaderAndWriter(XMPPTCPConnection.java:642) 
at org.jivesoftware.smack.tcp.XMPPTCPConnection.proceedTLSReceived(XMPPTCPConnection.java:742) 
at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$900(XMPPTCPConnection.java:139) 
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1003) 
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$200(XMPPTCPConnection.java:937) 
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:952) 
at java.lang.Thread.run(Thread.java:833) 
Caused by: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
at com.android.org.conscrypt.TrustManagerImpl.checkTrusted(TrustManagerImpl.java:324) 
at com.android.org.conscrypt.TrustManagerImpl.checkServerTrusted(TrustManagerImpl.java:225) 
at com.android.org.conscrypt.Platform.checkServerTrusted(Platform.java:115) 
at com.android.org.conscrypt.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:556) 
at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method) 
at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:324) 
at com.android.org.conscrypt.OpenSSLSocketImpl.waitForHandshake(OpenSSLSocketImpl.java:629) 
at com.android.org.conscrypt.OpenSSLSocketImpl.getInputStream(OpenSSLSocketImpl.java:591) 
at org.jivesoftware.smack.tcp.XMPPTCPConnection.initReaderAndWriter(XMPPTCPConnection.java:642) 
at org.jivesoftware.smack.tcp.XMPPTCPConnection.proceedTLSReceived(XMPPTCPConnection.java:742) 
at org.jivesoftware.smack.tcp.XMPPTCPConnection.access$900(XMPPTCPConnection.java:139) 
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1003) 
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$200(XMPPTCPConnection.java:937) 
at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:952) 
at java.lang.Thread.run(Thread.java:833) 
04-19 22:24:48.034 7891-8071/com.xmppdemo I/ReactNativeJS: react-native-xmpp: Disconnected, error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.

Feature request: Run towards self-signed cert.

When developing it would be nice to point the application towards a local/development environment that has a self-signed certificate.

I'm considering implementing this behaviour with a method where you can define a list of trustedHosts, and then when trying to connect to one of those, the library will bypass the certificate checks.

What do you think @aksonov ?

I hesitate because that mechanism could really get someone in trouble. It definitely should not be used in production :)

undefined is not an object

undefined is not an object (evaluating '_reactNative.ViewPropTypes.style')

Scene.js:30 loadModuleImplementation require.js:171 Actions.js:10 loadModuleImplementation require.js:171 index.js:1 loadModuleImplementation require.js:171 index.js:2 loadModuleImplementation require.js:171 index.ios.js:3 loadModuleImplementation require.js:171 guardedLoadModule require.js:116 global code require-0.js:1

Cannot build after join/message room pull-request.

As I see it, the feature isn't thought out as well.
It would be better if the sendRoomMessage would accept a roomId, so you can manage the state in your application state, instead of in the native module.

screen shot 2016-07-20 at 9 32 25 am

Android Require Package Build Failure

import XMPP from "react-native-xmpp"

Prevents a successful build with the following errors:

:react-native-xmpp:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/Users/trevorhealy/Programming/Applications/abc/abc/node_modules/react-native-xmpp/android/src/main/java/rnxmpp/RNXMPPPackage.java:28: error: method does not override or implement a method from a supertype
    @Override
    ^
Note: /Users/trevorhealy/Programming/Applications/abc/abc/node_modules/react-native-xmpp/android/src/main/java/rnxmpp/service/XmppServiceSmackImpl.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
:react-native-xmpp:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-xmpp:compileReleaseJavaWithJavac'.

Compilation failed; see the compiler error output for details.

Here is my React Native Version:

react-native --v
react-native-cli: 2.0.1
react-native: 0.48.4

I want to add chat functionality in my react-native app.

Can any one please guide me about xmpp protocol. I mean I want to integrate chat functionality which is one to one and group chat like whatsapp in my react-native app. What server do I need to use and what client side library should I use to integrate chat module in react-native.

Split connect and login

In order to deliver better performance for the users, we should split up the connect part from the actual login.

With this split, we can connect to the server when the app starts up, and the swiftly authenticate the given credentials when the user submits auth form.

Group chat support

Does this support group chat? I got one to one chat working but not sure how to send message to group chat.

Android support

Hey @aksonov, great implementation!
Any chance to see an android version anytime soon? It would be awesome to bridge Smack the same way you did with iOS!

Have a great day,

Cheers

[android] run the example err

D:\hazerWork\lib\react-native-xmpp\XmppDemo>npm start

[email protected] start D:\hazerWork\lib\react-native-xmpp\XmppDemo
node node_modules/react-native/local-cli/cli.js start

┌────────────────────────────────────────────────────────── ──────────────────┐
│ Running packager on port 8081. │
│ │
│ Keep this packager running while developing on any JS projects. Feel │
│ free to close this tab and run your own packager instance if you │
│ prefer. │
│ │
https://github.com/facebook/react-native
│ │
└────────────────────────────────────────────────────────── ──────────────────┘
Looking for JS files in
D:\hazerWork\lib\react-native-xmpp\XmppDemo\node_modules.0.30.0@react-native

[11:55:52] Building Dependency Graph
[11:55:53] Crawling File System
[Hot Module Replacement] Server listening on /hot

React packager ready.

[11:56:06] request:/index.android.bundle?platform=android&dev=true&hot=false&minify=false
[11:56:06] find dependencies

<--- Last few GCs --->

257806 ms: Scavenge 1392.3 (1457.6) -> 1392.3 (1457.6) MB, 6.6 / 0 ms (+ 1.0 ms in 1 steps since last GC) [allocation failure] [incremental marking delaying mark-sweep].
258471 ms: Mark-sweep 1392.3 (1457.6) -> 1391.1 (1457.6) MB, 665.9 / 0 ms (+ 137.0 ms in 1440 steps since start of marking, biggest step 7.0 ms) [last resort gc].
259136 ms: Mark-sweep 1391.1 (1457.6) -> 1390.8 (1457.6) MB, 664.2 / 0 ms [last resort gc].

<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0000033CA02B4639
1: indexOf(aka indexOf) [native string.js:~76] [pc=0000002DF57A95CD] (this=00000135D9CEDA41 <String[308]: D:\hazerWork\lib\react-native-xmpp\XmppDemo\node_modules.0.30.0@react-native\node_modules\babel-preset-react-native\node_modules\babel-plugin-transform-regenerator\node_modules\babel-core\node_modules\babel-helpers\node_modules\babel-template\node_modules\babel-traverse\node_modules...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory

How to sign in anonymously?

I already made an app with ionic logging anonymously, it was just passing the password as 'null' as it did, but in react-native-xmpp it is not working. Is there any way to log anonymously?

How do I know when a message has failed to reach the server?

Is there anyway to have a callback when I send a message?
Because I need to know whether the message reached the server or failed, otherwise I have to assume every message was delivered to the server even when there was an error. A good situation is clients with bad connections.

The current onError(message) function is never called if the user goes offline all of a sudden. And when it gets called sometimes, it just shows that "Server is not connected, please reconnect". It doesn't show which message failed. So if I sent many messages at once, and this function get called then I don't know from which message the fail started.

onDisconnect(message) as well doesn't get called right away when the user goes offline, at least if this was getting called I would have tried to monitor if the user is online before sending the message.

What can I do to know which messages failed and which ones reached the server successfully?

Complete roster items.

A lot of properties on the roster items are lost in conversion. Those should be added.

roster items should look like:

{
  "username": "testuser",
  "displayName": "Kristian",
  "groups": [
    "Contacts"
  ],
  "subscription": "from"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.