Skip to main content
The Tuteliq Swift SDK provides a native client for the Tuteliq child safety API using Swift concurrency (async/await). It supports iOS 15.0+ and macOS 12.0+.

Installation

Add the Tuteliq package via Swift Package Manager in Xcode:
  1. Go to File > Add Package Dependencies.
  2. Enter the repository URL:
  1. Select your desired version rule and add the package to your target.
Alternatively, add it to your Package.swift:

Deployment targets

Initialize the client

Never hardcode API keys in source code. Store them in the Keychain, Xcode build configuration, or a secrets manager.

Detect unsafe content

Scan a single text input for harmful content across all KOSA categories.

Detect grooming patterns

Analyze a conversation history for grooming indicators.

Analyze emotions

Evaluate emotional well-being from conversation text.

Analyze voice

Upload an audio file for transcription and safety analysis.

Fraud detection and safety extended

These methods cover financial exploitation, romance scams, and coercive behaviour targeting minors. Other endpoints — detectAppFraud, detectMuleRecruitment, detectGamblingHarm, detectCoerciveControl, and detectRadicalisation — follow the same call pattern shown here.

Detect social engineering

Identify manipulation tactics designed to trick a child into disclosing information or taking unsafe actions.

Detect romance scam

Analyze conversation text for romantic manipulation patterns that may indicate an adult posing as a peer.

Detect vulnerability exploitation

Detect attempts to identify and target emotional or situational vulnerabilities in a child.

Analyse multiple texts in one request

Run any supported detection across multiple texts in a single API call to reduce round-trips.
analyseMulti is billed per individual input × detection combination, not per request.

Error handling

The SDK throws typed TuteliqError values that you can pattern-match on.

Configuration options

SwiftUI integration

The SDK works seamlessly with SwiftUI. All methods are async and can be called directly from .task modifiers or @MainActor contexts.

Next steps

API Reference

Explore the full API specification.

Node.js SDK

See the Node.js SDK guide.