---
title: uriRepresentation()
framework: coredata
role: symbol
role_heading: Instance Method
path: coredata/nsmanagedobjectid/urirepresentation()
---

# uriRepresentation()

Returns a URI that provides an archiveable reference to the object for the object ID.

## Declaration

```swift
func uriRepresentation() -> URL
```

## Return Value

Return Value An NSURL object containing a URI that provides an archiveable reference to the object which the receiver represents.

## Discussion

Discussion If the corresponding managed object has not yet been saved, the object ID (and hence URI) is a temporary value that will change when the corresponding managed object is saved.

## See Also

### Related Documentation

- [managedObjectID(forURIRepresentation:)](coredata/nspersistentstorecoordinator/managedobjectid(forurirepresentation:).md)
- [object(with:)](coredata/nsmanagedobjectcontext/object(with:).md)

### Getting Managed Object ID Information

- [entity](coredata/nsmanagedobjectid/entity.md)
- [isTemporaryID](coredata/nsmanagedobjectid/istemporaryid.md)
- [persistentStore](coredata/nsmanagedobjectid/persistentstore.md)
