-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ios): move to swift, update native SDK to latest #174
base: master
Are you sure you want to change the base?
Conversation
hansemannn
commented
May 11, 2022
•
edited
Loading
edited
- Create swift project
- Move module class to swift
- Move manager class to swift
- Move client class to swift
- Test properly
@m1ga @caspahouzer The core migration is now done and it could probably get into the first testing. I assume there is some kind of bugs in the initial migration (as always), but if someone could start testing it already or provide me an app.js that I could test without setting up an additional server env, that'd be great! |
can you provide a binary test file than I can test it later with my demo project |
@hansemannn could you upload a binary please. It would be great to have this and the Android PR merged soon. then we can update module like tidev/ti.map#573 (comment) because the latest karma uses v4. |
…nto feature/swift # Conflicts: # .github/workflows/android.yml # .github/workflows/ios.yml
@hansemannn can you attach a binary please? Could give it a test run with my demo project |
This should should be up to date: https://www.dropbox.com/s/yfwqxn8s6mnyjti/ti.socketio-iphone-4.0.0.zip?dl=1 |
Thanks. Its not connecting to my test server (https://github.com/m1ga/socket_io_demo/tree/master/socketServer). old module version 3 with the workaround const io = new Server(httpServer, {
allowEIO3: true // false by default
}); -> connects fine new version with and without the workaround (shouldn't be needed) -> no connection. Android connects fine. If you run into cors issues change it to const io = new Server(server, {
cors: {
origin: "*"
}
}); |
Hi @hansemannn I just tried to download the binary without success. Can you please update the link? |
The native library hasn't been updated / maintained since over two years, so it seems like it's no longer supported. What are the reasons for still using the library? I was not able to build it locally since a while as well due to Swift incompatibility, so I'm not sure if it's worth to invest more time into this project, while other socket libraries like Pusher and PubNub are well-supported in Ti. |
we had a simple local socket.io server running to send around messages. Pusher or PubNub don't allow to connect to other socket servers, right? |
I don't think so, they are rather SaaS models. And to catch up: The existing version does not work anymore? |
the existing iOS version only supports v3 of socket.io and not v4. I've updated the Android version last year to have v4 included. |
Okay, got it. And v3 is not working anymore? I will definitely need to finish this - just checking how critical it is looking at it as a feature or required upgrade |
If you have control over the server you can run it in a compatibility mode to support v3 in v4 (https://socket.io/blog/socket-io-4-release/ - I don't have a project using it at the moment but since it was asked Slack and people use the Android version (see the old upgrade issue for details #168) |
I have the project running again, but the connect events and overall messaging does not work.. |
Weird - your Android version bundled with the example project does also not connect properly. |
@hansemannn We already have production environment with our own socket io server and android and ios socket io client which we want to keep. It was using the net.iamyellow.tiws module which is very old implementation (we have build newer version) and we have some issues from time to time(the client get disconnected). We want to replace the old one with this one. I already installed the android module which works great. I tried the iOS module also and I can connect successfully to the server, but after a couple of emitted events I do get disconnect event from the client with message “Namespace leave”. I also tried to make build, but I have several errors. |
@cucumbra Thanks for the insight! I just pushed my wip-changes so you can check it out. It has extensive logging included, but it seems like the initial connect just doesn't work, which is odd because I moved over the ObjC changes one by one. |
@hansemannn Thanks for the update. I just tried to build it with xcode 13 and 14, the same error still appears to me. Can you please share the build for iOS? |
But as I mentioned earlier, the connect does not seem to happen |
You are right, it can not connect to the server. I got disconnect message "Namespace leave". I checked the server and the event does not get to it |
Hi @hansemannn and @m1ga, is there any progress on this one? Is there any way I can help? |
Hi there! You can definitely help: The connect event does not fire and we need to figure out why :) |
As I mentioned earlier, although I don't have experience in native development with iOS, I tried to build the module from my local environment so I can try something out, but I have some errors that I am not able to fix. So I couldn't be of a much help in that part, but I can test the module for all of it's functionalities. We use the module for transmitting text, images, and videos across various connectivity settings, which means I'll be subjecting it to a wide range of testing scenarios. |