<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "visionOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SensitiveContentAnalysis",
  "identifier" : "/documentation/SensitiveContentAnalysis/SCSensitivityAnalyzer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Sensitive Content Analysis"
    ],
    "preciseIdentifier" : "c:objc(cs)SCSensitivityAnalyzer"
  },
  "title" : "SCSensitivityAnalyzer"
}
-->

# SCSensitivityAnalyzer

An object that analyzes media for sensitive content.

```
class SCSensitivityAnalyzer
```

## Overview

To check an image for sensitive content, call one of this class’s `analyzeImage` methods and pass in a user-provided image, or a URL to the image.

```swift
// Analyze an image file at a particular URL.
let response = try await analyzer.analyzeImage(at: url)
```

To analyze a video file, pass a URL to a video on disk into [`videoAnalysis(forFileAt:)`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalyzer/videoAnalysis(forFileAt:)) and wait for the [`hasSensitiveContent()`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalyzer/VideoAnalysisHandler/hasSensitiveContent()) method to complete.

```swift
let handler = analyzer.videoAnalysis(forFileAt: videoFileUrl)
let response = try await handler.hasSensitiveContent()
```

This class successfully detects sensitive content only when [`analysisPolicy`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalyzer/analysisPolicy) is a value other than [`SCSensitivityAnalysisPolicy.disabled`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalysisPolicy/disabled).

> Note:
> To analyze a video stream rather than static files, see ``doc://com.apple.SensitiveContentAnalysis/documentation/SensitiveContentAnalysis/SCVideoStreamAnalyzer``.

## Topics

### Creating a sensitivity analyzer

[`-  init`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalyzer/init())

Creates a sensitivity analyzer.

### Determining a detection strategy

[`analysisPolicy`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalyzer/analysisPolicy)

A property that determines if the app detects nudity and how the app responds.

### Analyzing images

[`-  analyzeCGImage:completionHandler:`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalyzer/analyzeImage(_:completionHandler:))

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

[`-  analyzeImageFile:completionHandler:`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalyzer/analyzeImage(at:completionHandler:))

Analyzes an image file on disk at a URL and runs code on completion.

### Analyzing video

[`videoAnalysis(forFileAt:)`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalyzer/videoAnalysis(forFileAt:))

Analyzes a video file on disk at a URL for sensitive content.

[`VideoAnalysisHandler`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalyzer/VideoAnalysisHandler)

An object that checks if a video contains sensitive content and provides status updates.

[`-  analyzeVideoFile:completionHandler:`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalyzer/analyzeVideoFile:completionHandler:)

Analyzes a video file on disk at the given URL and runs the given code on completion.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)