Contents

analyzeImage(_:completionHandler:)

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

Declaration

func analyzeImage(_ image: CGImage, completionHandler: @escaping  @Sendable (SCSensitivityAnalysis?, (any Error)?) -> Void)
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

Discussion

The completion handler:

  • Runs on an unspecified queue.

  • Provides a results parameter that indicates if checked content contains nudity.

See Also

Analyzing images