objectID
A unique identifier for each detected object type (face, body, hands, heads and salient objects) in a collection.
Declaration
var objectID: Int { get }Discussion
Defaults to a value of -1 when invalid or not available. When used in conjunction with an AVCaptureMetadataOutput, each newly detected object that enters the scene is assigned a unique identifier. objectIDs are never re-used as objects leave the picture and new ones enter. Objects that leave the picture and then re-enter are assigned a new objectID.