---
title: FamilyActivityPicker
framework: familycontrols
role: symbol
role_heading: Structure
path: familycontrols/familyactivitypicker
---

# FamilyActivityPicker

A view in which users specify applications, web domains, and categories without revealing their choices to the app.

## Declaration

```swift
@MainActor @preconcurrency struct FamilyActivityPicker
```

## Overview

Overview To prompt the user for their selection, create a binding to a FamilyActivitySelection instance, and use the binding to create a FamilyActivityPicker instance. You can then display the picker like any SwiftUI view. struct ExampleView: View {     @State var selection = FamilyActivitySelection()

var body: some View {         VStack {             Image(systemName: "eye")                 .font(.system(size: 76.0))                 .padding()

FamilyActivityPicker(selection: $selection)

Image(systemName: "hourglass")                 .font(.system(size: 76.0))                 .padding()         }         .onChange(of: selection) { newSelection in             let applications = selection.applications             let categories = selection.categories             let webDomains = selection.webDomains         }     } } note: A FamilyActivityPicker shown on a parent device only displays applications and websites from authorized child devices within the Family Sharing Group. A FamilyActivityPicker shown on an individually authorized device includes applications and websites from that same device. To streamline this process, call  the familyActivityPicker(isPresented:selection:) modifier on a view in your user interface. This modifier displays the picker view as a sheet over your user interface when the isPresented binding is true. struct ExampleView: View {     @State var selection = FamilyActivitySelection()     @State var isPresented = false

var body: some View {        Button("Present FamilyActivityPicker") { isPresented = true }        .familyActivityPicker(isPresented: $isPresented,                              selection: $selection)        .onChange(of: selection) { newSelection in            let applications = selection.applications            let categories = selection.categories            let webDomains = selection.webDomains        }    } } When you present the FamilyActivityPicker, the system displays a view where the user can select categories, applications, and web domains. As soon as the user confirms their selection, the system updates the FamilyActivitySelection binding with the user’s selections. To protect the user’s privacy, the system uses opaque values to represent the selections. Your app passes the selected values to the appropriate instances and methods from the Managed Settings and Device Activity frameworks.

## Topics

### Creating activity pickers

- [init(selection:)](familycontrols/familyactivitypicker/init(selection:).md)
- [init(headerText:footerText:selection:)](familycontrols/familyactivitypicker/init(headertext:footertext:selection:).md)
- [familyActivityPicker(title:headerText:footerText:isPresented:selection:)](swiftui/view/familyactivitypicker(title:headertext:footertext:ispresented:selection:).md)

### Accessing the content

- [body](familycontrols/familyactivitypicker/body.md)

### Adding view modifiers

- [View Modifiers](familycontrols/familyactivitypicker-view-modifiers.md)

## Relationships

### Conforms To

- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [View](swiftui/view.md)

## See Also

### Activity selections

- [FamilyActivitySelection](familycontrols/familyactivityselection.md)
