<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NearbyInteraction",
  "identifier" : "/documentation/NearbyInteraction/NIMotionActivityState",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Nearby Interaction"
    ],
    "preciseIdentifier" : "c:@E@NIMotionActivityState"
  },
  "title" : "NIMotionActivityState"
}
-->

# NIMotionActivityState

Motion states for a nearby accessory.

```
enum NIMotionActivityState
```

## Overview

Ranging accuracy improves when the framework knows whether the accessory is moving. Track your accessory’s motion using a method you choose and then use this enumeration to describe the motion among the available states. When the accessory’s motion state changes, inform the session by calling [`updateMotionState(_:forObjectWithToken:)`](/documentation/NearbyInteraction/NISession/updateMotionState(_:forObjectWithToken:))).

## Topics

### Specifying the motion state

[`case stationary`](/documentation/NearbyInteraction/NIMotionActivityState/stationary)

A value that indicates the accessory isn’t moving.

[`case moving`](/documentation/NearbyInteraction/NIMotionActivityState/moving)

A value that indicates the accessory is moving.

[`case unknown`](/documentation/NearbyInteraction/NIMotionActivityState/unknown)

A value that indicates the accessory’s motion state is unknown.

### Creating a motion state

[`init?(rawValue: Int)`](/documentation/NearbyInteraction/NIMotionActivityState/init(rawValue:))

Creates a motion state with the specified underlying value.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Sendable`](/documentation/Swift/Sendable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

---

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)