HomeiOS DevelopmentApple iOS Multicast utilizing Godot 4.2.1, C#, XCode

Apple iOS Multicast utilizing Godot 4.2.1, C#, XCode


I’m utilizing Godot 4.2.1 and C# (.NET 8.0.1) to create an app. In Godot the app is exported to an XCode mission so it will probably then be constructed to run on IOS gadgets. Entry WiFi is checked within the Godot presets I’ve the multicast entitlement from Apple. Communication over UDP utilizing Unicast to ship and obtain packets works accurately on iOS, macOS and Android gadgets.

To set the multicast entitlement, the mission identify is chosen in XCode, to open an enormous dialog field with a number of tabs. Click on on the tab Signing and Capabilities. So as to add the multicast to the mission “+ Functionality” is clicked, seek for “multi” which brings up multicast networking. Click on on multicast networking so as to add it to the mission.
Add Multicast Entitlement

Then in the identical dialog field, click on the tab construct settings and beneath “Signing” code signing id is modified to iOS developer for all Debug and launch gadgets.

Build Setting update

The mission is then constructed and run on the iOS gadget. The symptom is that no multicast packets are acquired.

The multicast receiving code beneath works on macOS and Android gadgets so there should be one thing occurring with the iOS gadgets that I am lacking.

The UDP server is configured in C# code as a _listener:

 personal const string MULTICAST_ADDRESS = "239.255.1.1";
 personal const int BCON_PORT = 49707;

_listener = new UdpClient();
_listener.ExclusiveAddressUse = false;
_listener.JoinMulticastGroup(IPAddress.Parse(MULTICAST_ADDRESS));
_listener.Consumer.Bind(new IPEndPoint(IPAddress.Any, BCON_PORT));

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments