aksonov / react-native-xmpp

XMPP library for React Native (iOS and Android native support)
BSD 2-Clause "Simplified" License
308 stars 98 forks source link

iOS: the way to add this sdk #118

Closed FansPro closed 5 years ago

FansPro commented 5 years ago

Platform:

react-native: 0.59.8 xcode: 10.2

Android that can link successful. And When I link this sdk to ios , i failed many times.
Here I tried many times and many ways.
1. react-native link react-native-xmpp. that will link xmppDemo.xcodeproj to library. And I delete this add RNXMPP.xcodeproj Libraries and that will show error like: null is not an object (evaluating "RNXMPP.PLAIN") or Failed to read Core Data model.
2. user cocoaPods recommend. When i fix @import KissXMLL not found and then that will crash.

Is anyone successful on ios, Please give me some suggestion

FansPro commented 5 years ago
The crash line on ios:
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
and Debug:
xmpp[12659:1625323] [] nw_socket_handle_socket_event [C4.1:1] Socket SO_ERROR [61: Connection refused]
2019-06-24 10:54:42.649450+0800 xmpp[12659:1625323] [] nw_socket_handle_socket_event [C4.2:1] Socket SO_ERROR [61: Connection refused]
2019-06-24 10:54:42.651778+0800 xmpp[12659:1625313] [] nw_connection_get_connected_socket [C4] Client called nw_connection_get_connected_socket on unconnected nw_connection
FansPro commented 5 years ago

I have fix it by cocoaPods React