Search code examples
objective-cswift3xcode8multicastipv4

Xcode 8.3.2 cannot find CocoaAsyncSocket.h


I'm an old-school c/c++ programmer new to the Xcode IDE, tasked with creating an app for iOS that can receive data from an IPv4 multicast address. Since Swift 3 doesn't have an API for joining to a multicast address or binding to a port, I need to embed Objective-C code in the Swift code.

I have found a number of ways to do it with an asynch UDP socket, but when I reference either CocoaAsyncSocket.h (or GCDAsyncUdpSocket.h), I get an error "Module 'CocoaAsyncSocket' not found." Indeed, if I do a file search, I come up dry.

I don't see that Objective-C or its libraries can be downloaded from Apple, and they didn't come along when I downloaded Xcode 8.3.2, nor can I locate an Open Source version. Can anyone provide some pointers? Thanks!


Solution

  • CocoaAsyncSocket

    UDP Server and Client in Swift

    Using the BlueSocket framework to create an echo server

    Multi-Client echo server with the BlueSocket framework and libdispatch

    BlueSocket pure Swift ...

    Minimalistic Multi-Client EchoSerwer written in Swift (no external framework required)

    enter image description here

    Minimalistic Echo UDP Server written in Swift (no external framework required)

    enter image description here