delegate
An object that the framework notifies of session events.
Declaration
weak var delegate: (any NISessionDelegate)? { get set }Discussion
An app must set a delegate to receive the peer’s distance and direction information through session(_:didUpdate:). The session(_:didInvalidateWith:) and session(_:didRemove:reason:) callbacks notify you when the session invalidated or removed a peer. The system may suspend an interaction session for various reasons (see sessionWasSuspended(_:)), such as when the peer backgrounds the app.