SCSensitivityAnalyzer
An object that analyzes media for sensitive content.
Declaration
class SCSensitivityAnalyzerMentioned in
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.
// 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:) and wait for the hasSensitiveContent() method to complete.
let handler = analyzer.videoAnalysis(forFileAt: videoFileUrl)
let response = try await handler.hasSensitiveContent()This class successfully detects sensitive content only when analysisPolicy is a value other than SCSensitivityAnalysisPolicy.disabled.