Push notifications play a very important role when it comes to providing users with information in good time and giving them the opportunity to take appropriate action. So far, in the Apple universe, this has always been done via the Internet using the APN (Apple Push Notification Service). It was possible to create a “local” push notification yourself on an iOS device, but only with a few restrictions.
As a consequence, an app cannot receive (push) notifications in environments without internet and therefore without a connection to the APNs. On a cruise, on an airplane, in hospitals or on campsites, where there is often only a limited or no internet connection, the push notification function of an app is impaired or simply not possible.
With iOS / iPadOS 14, Apple is taking a decisive step to keep push notifications functional even in restricted network environments. The local push connectivity is a solution from the Cupertino group that is supposed to solve this problem. It is an API that is integrated into the long-known NetworkExtensions, which enable various network-related interactions.
With the help of this new API, app developers can create an app that can communicate directly with the associated server – in a local WiFi network. Since no APNs are used here, app developers have to define their own protocol between the provider’s server and the app extension in order to distribute the push notifications. It is necessary for the application to register in the specific WLAN networks in which the local push connectivity is to be provided for the users. If the iOS device logs into one of the specified WLAN networks, the iOS system starts the app extension and it can be used to communicate with the server in the local network.
The app extension code uses the UserNotifications Framework to enable local notifications. A notification can be displayed, a sound can be played or a badge can be updated on an app. VoIP notifications are also possible. When receiving such a VoIP notification, the app extension uses the NEAppPushProvider Framework to report the incoming call to the iOS system. VoIP apps can also be used via the CallKit framework – for example a cruise ship without the Internet.
The local push connectivity API is designed for a small group of very specific use cases. These are characterized by restrictions in network environments and special requirements of the users in these environments. Therefore, app developers have to apply for a special entitlement from Apple. (mb)