One Logo Pool Ball
FamilyControls · IOS API REFERENCE

FamilyActivitySelection

struct · iOS 15.0+ · SDK 27.1

struct FamilyActivitySelection

A collection of applications, categories, and web domains selected by the user. To protect the user's privacy, `FamilyActivitySelection` holds opaque values that represent categories, applications, and web domains selected by the user. You can then pass these opaque values to instances and methods from the <doc://com.apple.documentation/documentation/ManagedSettings> and <doc://com.apple.documentation/documentation/DeviceActivity> frameworks to set up and manage parental controls. > Important: If a user, parent, or guardian revokes authorization of your app, > any tokens that ``FamilyControls/FamilyActivitySelection`` provided while your app > was authorized are voided. For more information on prompting the user to select items, see ``FamilyControls/FamilyActivityPicker``.

Members (12)

get · iOS 15.0+

categories

TypeScript
get categories(): Array<_ManagedSettings_ActivityCategory>
Swift declaration
var categories: Set<ActivityCategory> { get }

A set of category instances selected by the user.

get · iOS 15.0+

webDomains

TypeScript
get webDomains(): Array<_ManagedSettings_WebDomain>
Swift declaration
var webDomains: Set<WebDomain> { get }

A set of web domain instances selected by the user.

get · iOS 15.0+

applications

TypeScript
get applications(): Array<_ManagedSettings_Application>
Swift declaration
var applications: Set<Application> { get }

A set of application instances selected by the user.

get · iOS 15.0+

categoryTokens

TypeScript
get categoryTokens(): Array<_ManagedSettings_Token<_ManagedSettings_ActivityCategory>>
Swift declaration
var categoryTokens: Set<ActivityCategoryToken>

Tokens that represent categories selected by the user.

set · iOS 15.0+

categoryTokens

TypeScript
set categoryTokens(value: Array<_ManagedSettings_Token<_ManagedSettings_ActivityCategory>>)
Swift declaration
var categoryTokens: Set<ActivityCategoryToken>

Tokens that represent categories selected by the user.

get · iOS 15.0+

webDomainTokens

TypeScript
get webDomainTokens(): Array<_ManagedSettings_Token<_ManagedSettings_WebDomain>>
Swift declaration
var webDomainTokens: Set<WebDomainToken>

Tokens that represent web domains selected by the user.

set · iOS 15.0+

webDomainTokens

TypeScript
set webDomainTokens(value: Array<_ManagedSettings_Token<_ManagedSettings_WebDomain>>)
Swift declaration
var webDomainTokens: Set<WebDomainToken>

Tokens that represent web domains selected by the user.

get · iOS 15.0+

applicationTokens

TypeScript
get applicationTokens(): Array<_ManagedSettings_Token<_ManagedSettings_Application>>
Swift declaration
var applicationTokens: Set<ApplicationToken>

Tokens that represent applications selected by the user.

set · iOS 15.0+

applicationTokens

TypeScript
set applicationTokens(value: Array<_ManagedSettings_Token<_ManagedSettings_Application>>)
Swift declaration
var applicationTokens: Set<ApplicationToken>

Tokens that represent applications selected by the user.

init · iOS 15.0+

init

TypeScript
static initIncludeEntireCategory(includeEntireCategory: boolean): FamilyActivitySelection
Swift declaration
init(includeEntireCategory: Bool)

Creates a new activity selection instance. - Parameter includeEntireCategory: A Boolean value that indicates whether the selection should include applications and web domains from the selected categories.

get · iOS 15.2+

includeEntireCategory

TypeScript
get includeEntireCategory(): boolean
Swift declaration
let includeEntireCategory: Bool

A Boolean value that indicates whether the selection should include applications and web domains from the selected categories.

init · iOS 15.0+

init

TypeScript
static init(): FamilyActivitySelection
Swift declaration
init()

Creates a new activity selection instance. Sets ``FamilyControls/FamilyActivitySelection/includeEntireCategory`` to `false`.

Skipped declarations

No declarations were skipped in this snapshot.

All FamilyControls types →