ExistentialAudio/SwiftOSC

Support Swift Package Manager

Joebayld opened this issue · 18 comments

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.

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.

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.

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)

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

@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.

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

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.

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

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

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

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.