One Logo Pool Ball
AppIntents · IOS API REFERENCE

FocusFilterAppContext

struct · iOS 16.0+ · SDK 27.1

struct FocusFilterAppContext

A type that contains app-specific contextual information for a particular Focus, such as the notification filter criteria to apply.

Members (4)

init · iOS 17.0+

init

TypeScript
static initNotificationFilterPredicateTargetContentIdentifierPrefix(notificationFilterPredicate?: (_Foundation_NSPredicate) | null, targetContentIdentifierPrefix?: (string) | null): FocusFilterAppContext
Swift declaration
init(notificationFilterPredicate: NSPredicate? = nil, targetContentIdentifierPrefix: String? = nil)

Creates a focus filter context with a specified predicate and identifier prefix.

init · iOS 16.0+

init

TypeScript
static initNotificationFilterPredicate(notificationFilterPredicate?: (_Foundation_NSPredicate) | null): FocusFilterAppContext
Swift declaration
init(notificationFilterPredicate: NSPredicate? = nil)

Creates a `FocusFilterAppContext` with a specified `notificationFilterPredicate`

get · iOS 16.0+

notificationFilterPredicate

TypeScript
get notificationFilterPredicate(): (_Foundation_NSPredicate) | null
Swift declaration
let notificationFilterPredicate: NSPredicate?

An `NSPredicate` for system to filter the user's notifications of the app when a Focus is active.

get · iOS 17.0+

targetContentIdentifierPrefix

TypeScript
get targetContentIdentifierPrefix(): (string) | null
Swift declaration
let targetContentIdentifierPrefix: String?

An identifier you provide to the system for use in scheme prefixes for Focus. The system combines this prefix with the scheme `focus:` to prefix any `targetContentIdentifier` strings you provide for the system to evaluate against your app's `sceneActivationConditions`.

Skipped declarations

No declarations were skipped in this snapshot.

All AppIntents types →