I have a TCP app running that was written in Objective-C on iOS 10.3.3 on ipads. We have over a hundred, so upgrading them is not an option.
I need to update the app to Swift.
I am having an issue finding equivalent code for my communications.
In O-C I have:
socketQueue = dispatch_queue_create("socketQueue", NULL);
listenSocket = ([GCDAsyncSocket alloc] initWIthDelegate:self delegateQueue:socketQueue];
[self startTCPListener]
////// startTCPListener ///////
int port = xxxx;
NSError * error - nil;
if (![listenSocket acceptOnPort:port error:&error]) {
// error
}
Can someone please give me an example that is Swift-compliant and also on iOS 10.3.3 (cannot use await/async)?
Thank you,
jerry
Selecting any option will automatically load the page