<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SensitiveContentAnalysis",
  "identifier" : "/documentation/SensitiveContentAnalysis/SCSensitivityAnalysis/detectedTypes",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Sensitive Content Analysis"
    ],
    "preciseIdentifier" : "c:objc(cs)SCSensitivityAnalysis(py)detectedTypes"
  },
  "title" : "detectedTypes"
}
-->

# detectedTypes

A property that contains the categories of sensitive content that analysis detects.

```
var detectedTypes: Set<SCSensitivityAnalysis.ContentType> { get }
```

## Discussion

The Sensitive Content Analysis framework sets this property when analysis determines that media contains sensitive content. Check this property to determine the specific types of sensitive content, such as [`sexuallyExplicit`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalysis/ContentType/sexuallyExplicit) or [`goreOrViolence`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalysis/ContentType/goreOrViolence). The framework populates this set only when [`isSensitive`](/documentation/SensitiveContentAnalysis/SCSensitivityAnalysis/isSensitive) is `true`.

For example, the following code checks for specific content types after determining that media is sensitive:

```swift
let analysis = try await analyzer.analyzeImage(at: imageURL)

guard analysis.isSensitive else {
    displayContent(imageURL)
    return
}

// Check for specific harm types.
let detectedTypes = analysis.detectedTypes

if detectedTypes.contains(.sexuallyExplicit) {
    showContentWarning(
        message: "This image may contain nudity.",
        allowAccess: true
    )
}

if detectedTypes.contains(.goreOrViolence) {
    blockContent(
        message: "This image may contain violence or gore.",
        offerResources: true
    )
}
```

---

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)