We recently fixed an issue with not being able to receive udp with iOS 14 update. With iOS 14.0.1 this issue has started again.
We can receive udp within the Xcode debug however once published to TestFlight or store it no longer will receive data. We are using Cocoa Open Library GCDAsyncSocket. I will post code below.
We are very confused about the Local Network Privacy that has been added and the multicast entitlement. We are only receiving udp not broadcasting and also not multicasting. From my understanding the Local Network Privacy is not needed to just receive udp. The fact that it works in debug and not within TestFlight or Store makes me wonder if this is not the case and it's a permission issue. I added in the Local Privacy Network into the info.plist to verify and it still does not work. However I do not get a popup requesting permission nor do I see the app under the settings local privacy.
Is the local privacy network needed if you are only receiving udp not through bonjour services but through GCDAsyncSocket. Do I need to request the multicasting entitlement and how do I go about doing this?
This was working in 14.0.0 in the store version. It no longer works in 14.0.1
This is a small snipped of the code being used.
udpSocket = [[GCDAsyncUdpSocket alloc]initWithDelegate:self delegateQueue:dispatchgetmain_queue()];
NSError *error = nil;
if (![udpSocket bindToPort:GPSRecievePort error:&error])
{
NSString *ErrorMessage = [NSString stringWithFormat:@"ViewDidLoad : udp BindtoPort - %@", error];
ErrorMessage = [ErrorMessage stringByReplacingOccurrencesOfString:@"\"" withString:@""];
[self ErrorGPS:ErrorMessage];
NSLog(@"Error binding: %@", error);
[NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(Connect) userInfo:nil repeats:NO];
NSLog(@"GPS Reconnect");
GPSConnected = false;
return;
}
else
{
if(![udpSocket beginReceiving:&error])
{
NSString *ErrorMessage = [NSString stringWithFormat:@"ViewDidLoad : udp BindtoPort - %@", error];
}
}
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
With the latest update I'm unable to receive a UDP broadcast. I've tested this with a device that is on the previous OS and the current iOS 14 update. The previous version works as intended. Is this bug or does something need to be modified for instance in the plist possibly? I've tested a few other apps that offer a listener for UDP those appear to not be working as well. I've searched for information on this issue with no resolute as of now.