Comments (6)
hello @vladpre92,
iOS is not usable as is, and still in development.
nevertheless, I've managed to establish a sable connection with the plugin, otherwise nothing else can be done for now (listening, emitting events, ...)
from nativescript-socket.io.
Hi, I'm also having a similar issue. I haven't managed to debug, so I can't verify whether this is the case, but trying to connect to the server (or possibly it's checking socket.connected
, I'm not sure) cause the app to freeze on iOS (both in the emulator and on my iPad), on Android it works perfectly.
from nativescript-socket.io.
We are also facing the same problem,i have pasted the logs as well.
Starting iOS Simulator
Jun 30 18:19:45 imac backboardd[1570]: SecTaskCopyDebugDescription: demo[4352]
Jun 30 18:19:45 imac backboardd[1570]: SecTaskLoadEntitlements failed error=22 cs_flags=200, task->pid_self=-1
Jun 30 18:19:45 imac backboardd[1570]: SecTaskCopyDebugDescription: demo[4352]
Jun 30 18:19:45 imac backboardd[1570]: SecTaskLoadEntitlements failed error=22 cs_flags=200, task->pid_self=-1
Jun 30 18:19:45 imac backboardd[1570]: SecTaskCopyDebugDescription: demo[4352]
Jun 30 18:19:45 imac backboardd[1570]: SecTaskLoadEntitlements failed error=22 cs_flags=200, task->pid_self=-1
Jun 30 18:19:45 imac backboardd[1570]: SecTaskCopyDebugDescription: demo[4352]
Jun 30 18:19:45 imac backboardd[1570]: SecTaskLoadEntitlements failed error=22 cs_flags=200, task->pid_self=-1
Jun 30 18:19:45 imac backboardd[1570]: SecTaskCopyDebugDescription: demo[4352]
Jun 30 18:19:45 imac demo[4352]: assertion failed: 15E65 13E230: libxpc.dylib + 71506 [6F98A9DA-B46E-3A2B-88D4-92F1EC77477F]: 0x7d
Jun 30 18:19:45 imac demo[4352]: LOG SocketIOClient: Adding engine
Jun 30 18:19:45 imac demo[4352]: LOG SocketEngine: Starting engine. Server: http://192.168.2.14:3210
Jun 30 18:19:45 imac demo[4352]: LOG SocketEngine: Handshaking
Jun 30 18:19:45 imac demo[4352]: LOG SocketEngine: Got message: 0{"sid":"7wkqNeCdRVCjxM4OAAAA","upgrades":[],"pingInterval":2000,"pingTimeout":60000}
Jun 30 18:19:45 imac demo[4352]: LOG SocketEngine: Writing ws: has data: 0
Jun 30 18:19:45 imac demo[4352]: LOG SocketEngine: Sending ws: as type: 2
Jun 30 18:19:45 imac demo[4352]: LOG SocketEngineClient: Connect
Jun 30 18:19:45 imac demo[4352]: LOG SocketEngine: Got message: 40
Jun 30 18:19:45 imac demo[4352]: LOG SocketIOClient: Should parse message: 0
Jun 30 18:19:45 imac demo[4352]: LOG SocketParser: Parsing 0
Jun 30 18:19:45 imac demo[4352]: LOG SocketParser: Decoded packet as: SocketPacket {type: 0; data: []; id: -1; placeholders: 0; nsp: /}
Jun 30 18:19:45 imac demo[4352]: LOG SocketIOClient: Socket connected
Jun 30 18:19:45 imac demo[4352]: LOG SocketIOClient: Handling event: connect with data: (
)
Jun 30 18:19:45 imac demo[4352]: LOG SocketEngine: Got message: 3
Jun 30 18:19:47 --- last message repeated 8 times ---
Jun 30 18:19:47 imac demo[4352]: LOG SocketEngine: Writing ws: has data: 0
Jun 30 18:19:47 imac demo[4352]: LOG SocketEngine: Sending ws: as type: 2
Jun 30 18:19:47 imac demo[4352]: LOG SocketEngine: Got message: 3
Jun 30 18:19:48 imac demo[4352]: LOG SocketIOClient: Client is being released
Jun 30 18:19:48 imac demo[4352]: LOG SocketEngine: Engine is being closed.
Jun 30 18:19:48 imac demo[4352]: LOG SocketEngine: Sending ws: as type: 1
Jun 30 18:19:48 imac demo[4352]: LOG SocketEngine: Engine is being released
from nativescript-socket.io.
Found a solution for this issue.
In socket.ios.js file change the lines from
this.ios = SocketIOClient.alloc();
this.ios.initWithSocketURLOptions(NSURL.URLWithString(uri), options);
to
this.ios = SocketIOClient.alloc().initWithSocketURLOptions(NSURL.URLWithString(uri), options);
This will solve the problem.
from nativescript-socket.io.
makes sense. thanks @sowrabhbs
patched in 33a2fb4
from nativescript-socket.io.
Awesome
from nativescript-socket.io.
Related Issues (20)
- Reconnection
- need upgrade to {N} V4 ? HOT 2
- Can I use this plugin in NativeScript Angular? HOT 1
- IOS `init` is depricated HOT 8
- strange behavior can't build nativescript-socket.io HOT 3
- iOS Swift 4.0 Build Failed HOT 1
- Use websocket only on android HOT 22
- Plugin is not compatible with xcode 10.2 HOT 4
- Flavor 'nativescript-socket.io' has unknown dimension 'nativescriptsocketio' HOT 1
- Deprecated? HOT 1
- use with feathersjs HOT 1
- Not working on android :( HOT 23
- tns plugin add nativescript-socket.io is not working with 0.11.0 HOT 1
- IOS Build failed
- Event subscription never fires iOS
- Disconnect issue
- Cant connect to server without path HOT 1
- Cant connect to nodejs socket v4 with io.socket:socket.io-client v1 HOT 3
- Issue with include.gradle and keyword "compile" on NS 8 HOT 2
- Fails to build
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-socket.io.