Contents

newObjectID(for:referenceObject:)

Returns a new object ID that uses given data as the key.

Declaration

func newObjectID(for entity: NSEntityDescription, referenceObject data: Any) -> NSManagedObjectID

Parameters

  • entity:

    The entity for the new object ID.

  • data:

    An object of type Nsstring or Nsnumber to use as the key.

Return Value

A new object ID for an instance of the entity specified by entity and that uses data as the key.

Discussion

You should not override this method.

See Also

Manipulating Managed Objects