Highlights
Live video stream monitoring. New SafeMediaStreamEngine and SafeMediaStreamAnalyzing protocol, with the iOS 26+ AppleSensitiveContentStreamAnalyzer built on Apple's SCVideoStreamAnalyzer. Attach it to capture or VideoToolbox decompression pipelines for fail-closed monitoring — no verdict caching, and an unexpected loss of the analysis stream produces an .analysisFailed decision instead of failing open. Blurred streams cannot consume a newer verdict until the host explicitly continues them. (#2)
Documentation. Full DocC catalog with getting-started, testing, and live-video integration guides, plus Swift Package Index documentation hosting. (#1)
Added
SafeMediaStreamEngine,SafeMediaStreamSession,SafeMediaStreamEvent, and theSafeMediaStreamAnalyzingprotocol.AppleSensitiveContentStreamAnalyzer(iOS 26+) wrappingSCVideoStreamAnalyzer.- Stream-specific policy actions and the
.liveVideocontext. MockStreamAnalyzerwith ordered mock streams inSafeMediaKitTesting.- DocC catalog and
.spi.ymlfor Swift Package Index docs.
Changed
SafeMediaImageandSafeMediaImageViewnow accept local file URLs only. Other URL schemes produce a loading-failure decision via the policy'sfailureActioninstead of being read synchronously byData(contentsOf:).- The
detectedTypescategory mapping is now gated by#if canImport(SensitiveContentAnalysis, _version: 145)instead of#if compiler(>=6.4), so it keys on the framework version in the compile SDK and stays correct when a newer compiler builds against an older SDK.
Deprecated
classroomStrict— use the identicalchildStrict. Classroom deployment is expressed throughSafeMediaContext.classroomSubmission, not a separate policy. Removal no earlier than 1.0.
Upgrade notes
- Exhaustive
switchstatements overSafeMediaContextmust handle the new.liveVideocase. - Building the package now requires Xcode 26 or later (Swift 6.2+). Deployment targets are unchanged: iOS 17 / macOS 14 / Mac Catalyst 17.
Full changelog: 0.2.1...0.3.0