Open amp64 opened 3 weeks ago
Update, I was mistaken about one of my phones: This affects iOS 16 as well, on all devices I have tried. It is fine on iOS 15.3 devices.
Update, I was mistaken about one of my phones: This affects iOS 16 as well, on all devices I have tried. It is fine on iOS 15.3 devices.
@amp64 could you please share what exact version of .NET 8 are using (dotnet --info
)? Also are you using a MAUI app or plain dotnet new ios
app?
I tried you repro locally with latest .NET 8 servicing release (8.0.8), iPhone 11 with iOS 17.5.1 and the code worked correctly (i.e., it reported "Bound ok")
Dumb question but how do I determine the exact version of dotnet on my iPhone? dotnet --version on my PC says 8.0.6, my PC has the 8.0.302 NET SDK from VS installed. I am using Avalonia 11.1.2 to x-target iOS.
In the logs the closest I see to a version is Microsoft.iOS.Sdk/17.2.8053
In Solution Explorer if I click under Frameworks I see 8.0.624.26715, so it seems like I need to update this.
Sorry I have done a poor job with the repro here. I was thinking the error was from the Bind, but its actually in the subsequent SendTo. Add this:
var remoteIP = IPAddress.Parse("239.255.255.250");
var dest = new IPEndPoint(remoteIP, 1900);
await socket.SendToAsync(buff, SocketFlags.None, dest);
Dumb question but how do I determine the exact version of dotnet on my iPhone? dotnet --version on my PC says 8.0.6, my PC has the 8.0.302 NET SDK from VS installed. I am using Avalonia 11.1.2 to x-target iOS.
In the logs the closest I see to a version is Microsoft.iOS.Sdk/17.2.8053
In Solution Explorer if I click under Frameworks I see 8.0.624.26715, so it seems like I need to update this.
Not a dumb question at all. Running dotnet --info
on your PC should give you all necessary information: runtime, SDK and iOS workload versions. Basically, all the things that you mentioned in your comment.
Sorry I have done a poor job with the repro here. I was thinking the error was from the Bind, but its actually in the subsequent SendTo. Add this:
var remoteIP = IPAddress.Parse("239.255.255.250"); var dest = new IPEndPoint(remoteIP, 1900); await socket.SendToAsync(buff, SocketFlags.None, dest);
No problem, could you please update the repro example and I'll check it out.
I updated the description and the repro to improve usefulness and accuracy.
I'm marking these as 10.0 - as the priority is not that high. Once we figure out the real issue we can consider backporting to 9 as necessary.
I updated the description and the repro to improve usefulness and accuracy.
Can confirm that the new repro reproduces inside dotnet new ios
sample app on iOS 17.5.1 device.
Description
If you try and Send a Broadcast to a socket it will fail on iOS 17 devices with the error "no route to host". I believe this is due to the flag IP_BOUND_IF missing, described here: https://developer.apple.com/forums/thread/658518?answerId=631476022#631476022
Reproduction Steps
Expected behavior
The Send to work
Actual behavior
"No route to host" exception.
Regression?
Unknown. This does work on iOS 15 devices, and iOS 17 simulators.
Known Workarounds
No response
Configuration
iPhone SE 3, iOS 17.5.1, .NET 8 (and 7)
Other information
No response