---
title: "validate(completionHandler:)"
framework: arkit
role: symbol
role_heading: Instance Method
path: "arkit/arreferenceimage/validate(completionhandler:)"
---

# validate(completionHandler:)

Determines whether the reference image is valid.

## Declaration

```swift
func validate(completionHandler: @escaping @Sendable ((any Error)?) -> Void)
```

```swift
func validate() async throws
```

## Discussion

Discussion ARKit considers certain images invalid for image tracking (for example, an image that’s all white). Call this function on a reference image you create programmatically to make sure ARKit can track it, before passing it in to your session’s detectionImages array. You only need this function when you create a reference image programmatically, because Xcode performs this validation for you when you create a reference image in an asset catalog.
