---
title: "analyzeImage(_:completionHandler:)"
framework: sensitivecontentanalysis
role: symbol
role_heading: Instance Method
path: "sensitivecontentanalysis/scsensitivityanalyzer/analyzeimage(_:completionhandler:)"
---

# analyzeImage(_:completionHandler:)

Analyzes an image for sensitive content and runs code on completion.

## Declaration

```swift
func analyzeImage(_ image: CGImage, completionHandler: @escaping @Sendable (SCSensitivityAnalysis?, (any Error)?) -> Void)
```

```swift
func analyzeImage(_ image: CGImage) async throws -> SCSensitivityAnalysis
```

## Parameters

- `image`: An image in memory.
- `completionHandler`: Code that your app provides for the system to run on completion.

## Mentioned in

Testing your app’s response to sensitive media

## Discussion

Discussion The completion handler: Runs on an unspecified queue. Provides a results parameter that indicates if checked content contains nudity.

## See Also

### Analyzing images

- [analyzeImage(at:completionHandler:)](sensitivecontentanalysis/scsensitivityanalyzer/analyzeimage(at:completionhandler:).md)
