---
title: objectID
framework: coredata
role: symbol
role_heading: Instance Property
path: coredata/nsmanagedobject/objectid
---

# objectID

The object ID of the managed object.

## Declaration

```swift
var objectID: NSManagedObjectID { get }
```

## Mentioned in

Consuming relevant store changes Creating a Core Data Model for CloudKit

## Discussion

Discussion If the receiver is a fault, accessing this property does not cause it to fire. important: If the receiver has not yet been saved, the object ID is a temporary value that will change when the object is saved.

## See Also

### Related Documentation

- [uriRepresentation()](coredata/nsmanagedobjectid/urirepresentation().md)

### Getting a Managed Object’s Identity

- [entity](coredata/nsmanagedobject/entity-swift.property.md)
- [entity()](coredata/nsmanagedobject/entity().md)
