UDP connection working smoothly on iOS 14.0.1 in debug

Hello,

from 3 years I'm working on an app for radiators remote control.
The first step is to connect the radiator to the network and it works through these steps:
  • connect the iPhone to the radiator WiFi network

  • through udp connection I'm going to receive address and port from radiator

  • then I can send commands to connect the radiator to home WiFi

On iOS 14.0.1 I receive address and port from radiator just relaunching the app with Xcode otherwise I'm not able to retrieve these informations.
On iOS 14.2 (Beta) it looks working well (like iOS 13 and 12).
I'm using BlueSocket library to manage the socket.
Did someone noticed this issue?

Thank you in advance.

On iOS 14.0.1 I receive address and port from radiator just relaunching the app with Xcode otherwise I'm not able to retrieve these informations.

Interesting. Do you see the same result if you try with NWConnection or nw_connection_t? Also, when you were not able to connect, did you check the local network privacy settings in the Settings app?


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Yesterday I tried to change iOS target version from 10.0 to 11.0 and it started working well in debug and on TestFlight. Today on TestFlight and AppStore stopped working again.

In settings there is no local network privacy for my app, I asked Apple to enable Location Network Privacy capability and I'm still waiting for his answer.
I'm going to try with NWConnection but I cannot understand why in debug it works but not on the store.
Same problem with NWConnection. I also tried to enable Network Extension capability but not same stuff.
I added in the info.plist both NSBonjourServices and NSLocalNetworkUsageDescription.
I don't know how to show the prompt to let the user accept Privacy Local Network and Settings>Privacy>Local Network doesn't show my app.
I urgently need to fix that because customers are not able to connect their devices
How do you perform the following:

connect the iPhone to the radiator WiFi network

Do you do this with NEHotspotConfiguration and NEHotspotConfigurationManager?

If so, in your tests with NWConnection when you run send() to send data to the radiator, do you receive the prompt with the string in the NSLocalNetworkUsageDescription?


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
I tried with NEHotspotConfiguration and NEHotspotConfigurationManager but same behaviour, even if I don't think I need them.
Also tried to send command with NWConnection
Code Block            
let connection = NWConnection.init(host: "255.255.255.255", port: 12345, using: .udp)
let data = Data.init()
connection.send(content: data, completion: .contentProcessed({ (error) in
             print("Error: \(error?.localizedDescription)")
}))

but no prompt will be shown.

Just to describe better what I need to solve:
I connect my iPhone to radiator WiFi module and start receiving message from it.
When I receive the first "message" I'm able to get ip and port. Once I got ip and port, I can send a command to ask the radiator for networks list he sees around him. Then from the app I can select the network and send the password to radiator.
After that the communication continue via REST API.

Can you explain me better how I can achieve that?
Thank you in advance

Also tried to send command with NWConnection
but no prompt will be shown

Interesting. I would have expected the NWConnection to prompt you here for:

Code Block swift
NWConnection.init(host: "255.255.255.255", port: 12345, using: .udp)


What do you see in when you start this connection in the stateUpdateHandler ? Does your connection go into the .ready state?

If the connection gets stuck in .preparing, can you confirm there is a listener for this connection? Also, if the connection gets stuck in the .waiting state, this is a good indication that there is an issue with the local network privacy settings.

This is what I have been doing to test these scenarios;

1) Create a listener on an iOS 13 device and then try connecting with the iOS 14 device to send data and receive the local network privacy prompt on the iOS 14 device.

2) If using a broadcast address like 255.255.255.255 does not work then try using a direct address.

3) Test whether you able to hit the IP you received with another outside API from the app. Try going directly at the IP with either netcat or CURL.

Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Hi @meaton,
I just need help to solve the problem. My users are not able to use the app anymore after updating to iOS 14.
This is Apple reply for the entitlement:

Thank you for your interest in Multicast Networking. It sounds like you’re using WebSockets to make a unicast UDP connection to your devices. If that’s the case, you shouldn’t need the entitlement, just add the usage description so your users know why you use their local network and you should be all set. See How to use multicast networking in your app for more details, and if you have questions or issues, please use the “Network” tag on the Apple Developer Forums.

I already tried everything you told me, do you have any advice?

I just need help to solve the problem.

I’m going to recommend that you open a DTS tech support incident so that either Quinn or I can help you out one-on-one.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
Hello. Im having the same issue. My App connects to a Soft Ap network from our devices, which broadcasts data using a UDP connection. Using debug mode to install the App on my iPhone 11, the App communicates with our devices. However, when downloading from Testflight, there is no data showing from the UDP streams. This is only on iOS14. Same app downloaded from TestFlight on iOS 13 works.
I added the Privacy- Local Network usage description to Info list, but the App does no prompt the user to allow/deny permission. Is there a way to manually enable the pop-up alert?
I'm I missing something else? I am using AsyncUDPSocket library (objective C). It has been working for years, until now.
Appreciate any help quick so I can provide a solution to our customers.
Hi @meaton, FYI I opened a DTS.
Anyway with new iOS 14.2 Beta the app on the store works again and automatically show the prompt.
Now I can manage also the Local Network from privacy settings, but it still not work on 14.0.1.
I'm going to test on the 14.1 later tonight.
Hello, someone knows how much time the support needs to reply to DTS?
I urgently need to solve the problem on iOS 14.1.

someone knows how much time the support needs to reply to DTS?

DTS aims to send an initial response within 3 business days (although we usually do much better than that). You can find this and other tidbits on our developer web site page.

If I’m reading things right your support request landeded in my queue and I responded over a week ago. First, check your junk email because that’s the most common reason for DTS responses to go missing. If you still can’t find the response, please contact me via email (my address is in my signature, below) so that we can work out what’s gone wrong.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
UDP connection working smoothly on iOS 14.0.1 in debug
 
 
Q