I am developing a 3D Wi-Fi multiplayer (on common Wi-Fi network) game for iPhone and iPad without using any game engine. I am using Bonjour to publish and find nearby services. The game shows list of services available for connection.
Currently, NsNetServiceBrowser is even finding services which are already unpublished. During debugging I found that “didRemoveService” function of NsNetServiceBrowser’s delegate is not called when service is unpublished and as a result of this service name still appears on the list.
The above issue only happens on physical devices and not on simulators. On simulator, the list immediately updates when any service becomes unavailable.
I have the following questions:
- Are there any performance issues with NsNetServiceBrowser?
- Are there any coding changes required so that “didRemoveService” function is called immediately when service is unpublished?
I’d appreciate any suggestions on this issue. Thank you in advance.