Skip to content
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

Support Swift Package Manager #50

Open
Joebayld opened this issue Aug 25, 2020 · 18 comments
Open

Support Swift Package Manager #50

Joebayld opened this issue Aug 25, 2020 · 18 comments

Comments

@Joebayld
Copy link

Hi,

Is there plans to make a Package.swift and support SPM? It shouldn't be too difficult - just some moving of files to respective folders. I can make a PR if needed.

@devinroth
Copy link
Member

devinroth commented Aug 25, 2020 via email

@Joebayld
Copy link
Author

Cool.

I hit a wall with the ysocket as it's using C code. I believe this is still possible to use - but might be worth shifting to a pure swift socket. There's a lot available now with the Networking framework so maybe that's an option.

@devinroth
Copy link
Member

devinroth commented Aug 26, 2020 via email

@Joebayld
Copy link
Author

I'll give it a look. There's also https://github.com/robbiehanson/CocoaAsyncSocket which is a reputable networking library and also works nicely with SPM.

@devinroth
Copy link
Member

devinroth commented Aug 26, 2020 via email

@mk-conn
Copy link

mk-conn commented Dec 30, 2020

Hey Devin,

is there a chance for you to remember what the issues where with the Networking Framework? I had problems with the master branch (high cpu usage, server process was not stoped properly when my app was in the background, etc.) which where all gone once I decided to give the implementation in your dev branch a chance. Did not notice any issues so far (only in the simulator)

@devinroth
Copy link
Member

devinroth commented Dec 30, 2020 via email

@jcurtis-cc
Copy link

Hey Devin,

is there a chance for you to remember what the issues where with the Networking Framework? I had problems with the master branch (high cpu usage, server process was not stoped properly when my app was in the background, etc.) which where all gone once I decided to give the implementation in your dev branch a chance. Did not notice any issues so far (only in the simulator)

wonder if this is related to #56

@devinroth
Copy link
Member

devinroth commented Jan 28, 2021 via email

@devinroth
Copy link
Member

@mk-conn any update on the dev branch? Any issues that you came across? If not I'll look into merging it into the master.

@mk-conn
Copy link

mk-conn commented Jan 30, 2021

@devinroth Noticed sometimes nw_listener_socket_inbox_create_socket setsockopt SO_NECP_LISTENUUID failed [2: No such file or directory] and nw_protocol_get_quic_image_block_invoke dlopen libquic failed but I have no clue if this is related to an issue in your code or a problem NWListener/NW protocols... It does not happen all the time and its not really reproducible (it seems)

@devinroth
Copy link
Member

devinroth commented Jan 30, 2021 via email

@mk-conn
Copy link

mk-conn commented Jan 30, 2021

Since the last Xcode update pretty much on every try to start the simulator, which is making the simulator unusable. On a real device there are other errors coming up, like this:

 [connection] nw_endpoint_handler_create_from_protocol_listener [C3 192.168.178.27:63357 failed channel-flow (satisfied (Path is satisfied), viable, interface: en0, scoped, ipv4, ipv6, dns)] nw_endpoint_flow_pre_attach_protocols

 [connection] nw_connection_create_from_protocol_listener_on_nw_queue [C3] Failed to create connection from listener
 [] nw_ip_channel_inbox_handle_new_flow nw_connection_create_from_protocol_listener_on_nw_queue failed

But not every time the app is run and also not reproducable.

@devinroth
Copy link
Member

Thanks. I'll try to tackle this when I get a chance.

@mk-conn
Copy link

mk-conn commented Feb 2, 2021

So... got some news on the simulator issue: turns out, when you run the app, the simulator has focus, the network connections does not come up with the errors I told above - click some where in the editor in Xcode - the network connection is established. I'm heavily confused now but I'm still not thinking your code is responsible for that. ;)

@devinroth
Copy link
Member

devinroth commented Feb 2, 2021 via email

@soundflix
Copy link

Hi,
I checked out dev branch for the last weeks with my small app. It runs fine here. It can also use Bonjour.
SPM support worked without moving files, it's enough to specify the sources path in package.swift

@onehundredfeet
Copy link

This would be great to add. I just spent more time wrangling cocoa pods than is worth the effort. Now to write the package.swift myself, but would be awesome to just include it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants