I'm developing a 'game' using the Godot game framework. The 'game' will run on an IOS device and connect to an app that is running on my computer. The app I am connecting to communicates via UDP.
When I run the app in Godot's simulator using either the loopback address 127.0.0.1 or the WiFi address of the computer it works fine.
I am attempting to send a Unicast UDPpacket from the IOS device to the computer. The UDPpacket is never sent from the IOS device as verified by Wireshark and also the network tab on xcode as the 'game' is debugged via Xcode.
The first time the app is sent to the iphone during the debug session from Xcode, a message on the iPhone pops up "MyAppName" would like to find and connect to devices on your local network. (I clicked on "Allow")
When the app is debugged on the iphone via Xcode,
debug message from near the point where UDPPackets are sent are displayed in the debugger.
After about 5 seconds an error is thrown from the UDPClient "No route from host..."
There is a loop to send UDPpackets is again if the expected response is not received from the app,
the "No route from host" again is shown in 5 seconds.
Settings:
Ip address on computer and iphone are within the same network (do not need to be routed)
Firewall is off on the computer during testing
iPhone Settings (MyAppName is not shown anywhere in settings)
Godot 4.2.1, .Net 8.0.101, XCode 15.2, VSCode 1.85.2
**Godot editor -> Project -> Exports -> Presets -> IOS (Runnable) **
[Options Tab]
Access WiFi [x] is checked
Provisioning Profile UUID for both Debug and Release is BLANK
[Resources Tab]
{All fields are blank}
[Features Tab]
Feature list = arm64, astc, etc2, ios, mobile
[Encryption Tab]
{everything is off or blank}
I suspect that I'm not using entitlements properly. I have been granted the multicast entitlement, but I'm not certain how to implement it in my Godot -> VSCode ->Xcode workflow.
Post
Replies
Boosts
Views
Activity
I am using Godot 4.2.1 and C# (.NET 8.0.1) to create an app. In Godot the app is exported to an XCode project so it can then be built to run on IOS devices. Access WiFi is checked in the Godot presets I have the multicast entitlement from Apple. Communication over UDP using Unicast to send and receive packets works correctly on iOS, macOS and Android devices.
To set the multicast entitlement, the project name is selected in XCode, to open a big dialog box with multiple tabs. Click on the tab Signing and Capabilities. To add the multicast to the project "+ Capability" is clicked, search for "multi" which brings up multicast networking. Click on multicast networking to add it to the project.
Then in the same dialog box, click the tab build settings and under "Signing" code signing identity is changed to iOS developer for all Debug and release items.
The project is then built and run on the iOS device. The symptom is that no multicast packets are received.
The multicast receiving code below works on macOS and Android devices so there must be something going on with the iOS devices that I'm missing.
The UDP server is configured in C# code as a _listener:
private const string MULTICAST_ADDRESS = "239.255.1.1";
private const int BCON_PORT = 49707;
_listener = new UdpClient();
_listener.ExclusiveAddressUse = false;
_listener.JoinMulticastGroup(IPAddress.Parse(MULTICAST_ADDRESS));
_listener.Client.Bind(new IPEndPoint(IPAddress.Any, BCON_PORT));