Spatial Interactions

Spatial interactions enable on-device experiences that integrate the presence of people and objects in the nearby environment. A great spatial interaction often feels intuitive and natural to people, because it builds on their innate spatial awareness of the world around them. For example, a person playing music on their iPhone can continue listening on their HomePod mini simply by bringing the devices close together.

The Nearby Interaction framework helps you create spatial interaction sessions that incorporate information from nearby devices. Before participating in such experiences, people grant permission for their devices to interact while they’re using your app. The Nearby Interaction framework helps you preserve people’s privacy by relying on randomly generated device identifiers that last only as long as the interaction session your app initiates.

Nearby interaction is available beginning in iOS 14 and watchOS 8, and requires devices that include the U1 chip, such as iPhone 11 and later models. In watchOS, all apps participating in a nearby interaction experience must be in the foreground. For developer guidance, see Nearby Interaction.

Designing Great Spatial Interactions

Consider these guidelines as you design spatial interactions for your app.

Avoid using a spatial interaction as the only way to perform a task. You can’t assume that everyone can experience a spatial interaction, so it’s essential to provide alternative ways to get things done in your app.

Consider a task from the perspective of the physical world to find inspiration for a spatial interaction. For example, people can easily use onscreen UI to transfer a song from their iPhone to a HomePod mini, but letting people target a device by moving close to it gives them an intuitive way to perform the task. Discovering the physical actions that inform the concept of a task can help you create an engaging experience that makes performing the task feel easy and natural.

Help people understand a spatial interaction by providing clear, reliable feedback. A great spatial interaction feels like a natural extension of a physical experience, so it shouldn’t require explanation for people to understand it. When you clearly and consistently connect an interaction’s feedback to people’s movements, they quickly learn how it works.

Use distance, direction, and context to inform an interaction. Although your app may get information from a variety of sources, prioritizing nearby, contextually relevant information can help you deliver experiences that feel organic. For example, if people want to share content with a friend in a crowded room, the iOS share sheet can suggest a likely recipient by using on-device knowledge about the user’s most frequent and recent contacts. Combining this knowledge with information from nearby devices that include the U1 chip can let the share sheet improve the experience by suggesting the closest contact the user is facing.

Consider how changes in physical distance can guide a spatial interaction. In the physical world, people generally expect their perception of an object to sharpen as they get closer to it. A spatial interaction can mirror this experience by providing feedback that changes with the proximity of an object. For example, when people use iPhone to find an AirTag, the display transitions from a directional arrow to a pulsing circle as they get closer.

Provide continuous feedback. Continuous feedback reflects the dynamism of the physical world and strengthens the connection between a spatial interaction and the task people are performing. Keep people engaged by providing uninterrupted feedback that responds to their movements.

Consider using multiple feedback types to create a holistic experience. Fluidly transitioning among visual, audible, and haptic feedback can help a spatial interaction’s task feel more engaging and real. Using more than one type of feedback also lets you vary the experience to coordinate with both the task and the user’s context. For example, while people are interacting with the device screen, visual feedback makes sense; while people are interacting with their environment, audible and haptic feedback complement their shift in focus.

Helping People Have Successful Nearby Interactions

The following guidelines can help you ensure that people have great interactive experiences in your app.

Encourage people to hold the device in portrait orientation. Holding a device in landscape can decrease the accuracy and availability of information about the distance and relative direction of other devices. If you support only portrait orientation while your spatial interaction feature runs, your app gives people visual feedback on how to hold the device for an optimal experience. In general, prefer this type of implicit, visual feedback; when possible, avoid explicitly telling people to hold the device in portrait.

Design for the device’s directional field of view. Nearby interaction relies on a hardware sensor with a specific field of view similar to that of the iPhone 11 Ultra Wide camera. If a participating device is outside of this field of view, your app might receive information about its distance, but not its relative direction.

Help people understand how intervening objects can affect the nearby interaction experience in your app. When other people, animals, or sufficiently large objects come between two participating devices, the accuracy or availability of distance and direction information can decrease. Consider adding advice on avoiding this situation to onboarding or tutorial content you present.