Devices can discover each other in a privacy-preserving manner by using something we call a discovery token.Ī discovery token is a randomly generated identifier for a given device in a particular Nearby Interaction session. Before this can happen, your app needs to let the system know, on both sides, how to identify the other device when it is nearby. So let's say that there are two or more users running your app, and they want to interact with one another in some spatial manner. Similar to patterns in other Apple frameworks such as ARKit, you provide your session object a configuration you would like it to run with. All Nearby Interactions are encapsulated in sessions. You start with creating a Nearby Interaction session object. Let's talk about the interface for making this happen. In this graphic, I'm showing four devices interacting with one another by each running three sessions in parallel. Each device can run several sessions at the same time, each session with one other peer. Your app is not limited to interacting with just one device. As this slide shows, these updates are bi-directional, and both sides of the session are learning about each other's relative position simultaneously. So when your app is running a Nearby Interaction session, it is able to get a continuous stream of updates containing distance and direction information. Nearby Interaction provides your app two main types of output: a measurement of distance between devices, and a measurement of relative direction from one to the other. And I'll close with some best practices for you to adopt in your application. Then I will take you through what it takes to start streaming relative position updates. I will talk about spatial awareness in iOS with Nearby Interaction. Nearby Interaction will be available to your apps on U1-equipped devices running iOS 14. This kind of rich spatial information enables you to create user experiences that are more natural and more intuitive in your application. If users on both sides choose to grant permission, their devices can start to understand how far apart they are and in which relative direction. The user can choose between not allowing your app to interact with a nearby device, or granting it a one-time permission that remains in effect until your app is exited. ![]() The first thing the system will do is present a permission prompt to both users. ![]() Say your app wants to run a Nearby Interaction session with another user's device. Let's start by talking about user control and transparency. So today, we are introducing the Nearby Interaction framework, a powerful yet easy-to-use interface to spatial awareness in iOS. We wanted to empower you to use such capabilities in your application. This sort of high-fidelity interactivity is only possible thanks to the Apple-designed U1 chip. The user can orient their device toward someone else's device to give a strong hint to the share sheet for presenting the most relevant sharing selection. The top selection that I'm highlighting here uses spatial sensing technologies available for the first time in the iPhone 11. Such understanding in a device you're holding in your hand can translate into fluid interactions with the environment. Spatial awareness, in essence, means understanding the physical world around you. Today we will talk about how to build a completely new class of user interactions that are based on spatial awareness in iOS. Hello and welcome to the session "Meet Nearby Interaction." My name is Yagil, and I'm an engineer from the Location team here at Apple.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |