I am working on a game app that uses multicast to advertise and locate a hosted game. It therefore requires local network permission. Entitlements are set up correctly in the app for using multicast.
I have two iPhones I use for testing my app, one was using iOS 18.1.x (not exactly sure about the value of x) and the other was using a later version of 18. I install the app on these devices via TestFlight. On the device using iOS 18.1.x the networking worked perfectly, and I could host or join a game (connecting to the same app running on my mac).
The device using the later version would fail to see advertised games as well as failing to advertise games itself. Updating this device to the latest iOS (18.7.2) did not fix the problem. To test that it is likely related to the later version of iOS, I updated the 18.1.x device that was working to 18.7.2, and now it does not work either.
I could see the app listed under "Privacy and Security/Local Network" in settings on the device that used to work with 18.1.x, but not the device with the later version of iOS . Now it does not show up on either device. Nor does either device ask for permission when I activate a network game on the app, even after repeatedly deleting and reinstalling the app as well as resetting the devices.
Why does the device not ask for permission when I try to set up a network game, and how can I get this working again?
I’m not aware of any change in iOS 18.7.2 that caused widespread problems like this. In my experience, such problems are usually caused by poorly written multicast code. For advice on how to avoid such probelms, see Extra-ordinary Networking > Broadcasts and Multicasts, Hints and Tips.
Or, better yet, use Bonjour for this. It’s an industry standard, supported everywhere that’s relevant, and a lot easier to implement.
Finally, TN3179 Understanding local network privacy has a bunch of hints and tips about local network privacy.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"