---
title: detectedTypes
framework: sensitivecontentanalysis
role: symbol
role_heading: Instance Property
path: sensitivecontentanalysis/scsensitivityanalysis/detectedtypes
---

# detectedTypes

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

## Declaration

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

## Mentioned in

Detecting sensitive content in media and providing intervention options Testing your app’s response to sensitive media

## Discussion

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 or goreOrViolence. The framework populates this set only when isSensitive is true. For example, the following code checks for specific content types after determining that media is sensitive: 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     ) }

## See Also

### Identifying content categories

- [SCSensitivityAnalysis.ContentType](sensitivecontentanalysis/scsensitivityanalysis/contenttype.md)
