Issues on iOS 14.5 and later
With the iOS 14.5 update, Apple introduced new restrictions on multicast and broadcast communication: Apps are no longer per default allowed to send multicast and broadcast requests on the local network when using low level BSD sockets. Nabto’s client SDKs uses such low level BSD sockets and are hence affected.
This means that Nabto 4/Micro’s broadcast based discovery and Nabto 5/Edge’s multicast (mDNS) based discovery no longer return any local devices.
It is possble to continue to use the existing BSD based Nabto device discovery. Apple writes:
Maintaining compatibility with some legacy devices and software might require the use of custom multicast and broadcast protocols. Since these capabilities give your app complete access to the user’s local network, such access requires the com.apple.developer.networking.multicast restricted entitlement.
So you must request the multicast entitlement for each app that uses local device discovery implemented by the Nabto Client SDK. This is done on the Apple developer website. Note that users will see a warning about your app accessing the local network.
Nabto Edge customers can use the following template to describe why it is required to send multicast messages:
We use an underlying SDK for communication with our embedded devices, the Nabto Edge Client SDK. This SDK implements a proprietary protocol for IoT communication. For local device discovery, the protocol uses UDP multicast on the local subnet implemented using BSD sockets. A later version of the Nabto Edge Client SDK will use the NWBrowser and related APIs instead. Until this is implemented, we need the multicast entitlement to be able to use the BSD socket based approach.
Nabto Nabto 4/Micro customers can use the following template to describe why it is required to send broadcast messages:
We use an underlying SDK for communication with our embedded devices, the Nabto 4/Micro Client SDK. This SDK implements a proprietary protocol for IoT communication. For local device discovery, the protocol uses UDP broadcast on the local subnet. We have a fleet of devices deployed that uses this proprietary protocol that cannot be easily updated.
Long term solution
Nabto will update the Nabto Edge Client SDK to use the NWBrowser and related APIs instead of BSD sockets. In this way it is no longer required to request the multicast entitlement from Apple. Also, users will no longer see a warning. This refactoring of the SDK is not expected to be available until Q1 2022.
There will be no updates for the Nabto 4/Micro Client SDK in this regard; it will be necessary to either live with the entitlement request and user warning or migrate to the Nabto Edge platform.