Multicast UDP Packets Stopped Working on iOS MAUI App #26628
Labels
platform/iOS 🍎
potential-regression
This issue described a possible regression on a currently supported version., verification pending
t/bug
Something isn't working
Description
I have a MAUI ios and android app. I originally created it with net7 and then updated it to net8.
I use the following code to "ping" a device on my network that I also created:
This is how discover the IP address of my device. The I can connect to it.
This was working fine when I would build and deploy it from VS for Mac several months ago.
I then didn't work on it for several months.
Since that time I have started using VSCode on my mac. when I went to build it today, however, I was not able to debug it for some reason.
So I set up Visual Studio 2022 on a VM in Parallels on my mac.
I am able to build and debug, but now when I hit the udpClient.Send I get an exception that "no route is found".
When I search for that it talks about needing the multicast entitlement from Apple for my app.
If that is the case why did it used to work? Posts about that have been around for a long time...
The first time I run my app after initial installation the app does ask for permission to search for device on the local network and I Allow it.
It doesn't ask again unless I remove the app from the phone first.
I tried updated the app to net9 to see if that would make a difference and it doesn't.
I then posted a question on the Microsoft Answer site here:
https://learn.microsoft.com/en-us/answers/questions/2127840/multicast-udp-packets-stopped-working?comment=answer-1885404&page=1#comment-1860593
Some answered that it was because I didn't have the proper Entitlements.plist with the entry about multicast. I didn't think that was it because it wasn't there when it was working and that entitlement has been around a while.
I didn't have any other ideas, so I contacted apple and requested permission to have that capability on this app.
They granted it and I added the proper entitlement to the file and created a new provisioning profile.
This still gave the exact same error at the exact same place.
So I think this is a bug or change that I need help with.
Please help.
Steps to Reproduce
Link to public reproduction project repository
No response
Version with bug
9.0.21 SR2.1
Is this a regression from previous behavior?
Yes, this used to work in .NET MAUI
Last version that worked well
8.0.40 SR5
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
No
Relevant log output
The text was updated successfully, but these errors were encountered: