With Nearby Interaction, Apple announced a new feature for iOS 14 at WWDC 2020. This new feature allows a device to use the U1 chip to evaluate its proximity to other devices.
So far, AirDrop was the best-known function based on the capabilities of the U1 chip with ultrawideband technology: With iOS 13 and an iPhone 11, the user receives a top selection of the “closest” users – provided that they are also an iOS device with a U1 chip – this is (currently) only available in an iPhone 11. The user can then align their device to the preferred device in order to optimize data transmission.
With the Nearby Interaction Framework, Apple has now released this function for developers. The framework allows spatial interactions to be created based on the relative positions (distance and direction) of two or more iOS devices.
This capability, also known as “spatial awareness”, essentially means that iOS devices can better understand and interact with the physical world around them. The “interaction nearby” framework works on an opt-in basis. Accordingly, users have to give permission to use the U1 chip every time they open an app with this framework. The approval remains until your app is closed.
If users have given authorization on both sides, their apps on the iOS devices begin to “understand” how far they are apart and in which relative direction the other device is. As long as a session of an app exists, it can access a continuous stream of updates with distance and direction information. An app uses one session per device detected (with the app activated).
Similar to patterns in other Apple frameworks, such as ARKit, app developers give the session object a configuration with which it should be executed. Suppose two or more users are running an app and want to interact with each other spatially. Before this can happen, an app must inform the system on both sides of how to identify the other device nearby. A so-called discovery token is available for data protection reasons.
Currently, the possible uses are still somewhat limited, as there is only this one device class with the U1 chip with the iPhone 11 and Apple also did not show a really convincing scenario in its WWDC session. As soon as more devices have this chip, there could certainly be exciting interaction options. (mb)