<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "watchOS: 7.3.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NearbyInteraction",
  "identifier" : "/documentation/NearbyInteraction/NISessionDelegate/sessionSuspensionEnded(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Nearby Interaction"
    ],
    "preciseIdentifier" : "c:objc(pl)NISessionDelegate(im)sessionSuspensionEnded:"
  },
  "title" : "sessionSuspensionEnded(_:)"
}
-->

# sessionSuspensionEnded(_:)

Notifies you of the end of a session’s suspension.

```
optional func sessionSuspensionEnded(_ session: NISession)
```

## Parameters

`session`

The session that NI suspended.

## Discussion

NI suspends an interaction session when the user backgrounds the app. NI ends the suspension when the user foregrounds the app again. An app may resume a suspended session only after NI invokes this callback. To resume a session after a suspension ends, call [`run(_:)`](/documentation/NearbyInteraction/NISession/run(_:)), passing in your session’s configuration.

Session suspension is a local event. The framework suspends only the user’s session when the user or system event such as a phone call backgrounds the app. However, if the app stays backgrounded for too long during a suspension, NI invalidates the session with [`session(_:didInvalidateWith:)`](/documentation/NearbyInteraction/NISessionDelegate/session(_:didInvalidateWith:)) and the peer user’s session invokes [`session(_:didRemove:reason:)`](/documentation/NearbyInteraction/NISessionDelegate/session(_:didRemove:reason:)) with `reason` [`NINearbyObject.RemovalReason.timeout`](/documentation/NearbyInteraction/NINearbyObject/RemovalReason/timeout).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)