One Logo Pool Ball
Photos · IOS API REFERENCE

PHReferenceImageInfo

class · iOS 27.0+ · SDK 27.1

class PHReferenceImageInfo

Members (3)

get · iOS 27.0+

imageContainsReferenceImageData

TypeScript
get imageContainsReferenceImageData(): boolean
Swift declaration
var imageContainsReferenceImageData: Bool { get }

Returns true if the file or photo library asset used to construct this object contains Apple Reference Image data. Use this property to determine if the asset contains Apple Reference Image data that can be processed and/or viewed using `View/photosReferenceImageViewer`. If the input was not an image, or does not contain Apple Reference Image data, this returns false. The first time this property is accessed, the image metadata from the file or from the photo library is read to determine if the image contains Apple Reference Image. Consider wrapping it in a `Task` to avoid blocking the main thread while the image metadata is read. When this property returns false, you should hide any controls that would show the Apple Reference Image viewer. For example, Preview hides the "Show Reference Image" button in its inspector when viewing an image file that does not contain Apple Reference Image. visionOS does not support viewing Apple Reference Image data. For iPad apps on visionOS, this property will always return false.

init · iOS 27.0+

init

TypeScript
static initAsset(asset: PHAsset): PHReferenceImageInfo
Swift declaration
init(asset: PHAsset)

Creates a Apple Reference Image info object from a PHAsset representing a photo from the photo library.

init · iOS 27.0+

init

TypeScript
static initFileURL(fileURL: string): PHReferenceImageInfo
Swift declaration
init(fileURL: URL)

Creates an info object from a file URL representing a HEIC, JPEG, or DNG containing an image with Apple Reference Image data. If the file URL references a file that is not an image file, or an image file that does not contain Apple Reference Image data, `PHReferenceImageInfo/imageContainsReferenceImageData` will return false.

Skipped declarations

No declarations were skipped in this snapshot.

All Photos types →