I am updating a universal app for release on iOS 17+ devices using Xcode15.2 and Solar2d v3708. The last release was 7 years ago.
The app connects to the local network and used a custom UDP protocol to connect to and control specific hardware devices. The protocol involves transmitting and receiving both broadcast and unicast messages to/from IPV4 capable proprietary devices on the local network.
When I run the app in the Solar2d simulator and when I run the current version installed from the App store on my iPad, communications work well.
When I build the same code into a new development build and transfer it to my iPad, I found that attempts to send broadcast messages are failing. When I print out the error returned from the socket interface to the console, I see the message is "No Route to Host".
I requested multicast capability from Apple and when it appeared on my development portal I updated the App Id to include the multicast entitlement. I updated the development profile to include our new 6th gen IPad and the updated AppID. I downloaded and installed the development profile. That new profile is what I am selecting / using to sign the app.
I am using lua socket library to send broadcast messages
I created a very basic project with just the basic networking code example and built this for my iPad the results are the same.
local socket = require("socket")
local main, errorMain = socket.udp6()
main:setoption('broadcast', true)
local ack, mError = main:sendto("", "::FFFF:255.255.255.255", 3100)
print("My Debug Message: Main sending - " .. (ack or "nil") .. ", Error : " .. (mError or "None"))
I also tried modifying my code to use udp4 as follows and the results were the same.
local socket = require("socket")
local main, errorMain = socket.udp4()
main:setoption('broadcast', true)
local ack, mError = main:sendto("", "255.255.255.255", 3100)
print("My Debug Message: Main sending - " .. (ack or "nil") .. ", Error : " .. (mError or "None"))
console output: My Debug Message: Main sending - nil, Error : No route to host
Any help or insight would be greatly appreciated.