<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "FamilyControls",
  "identifier" : "/documentation/FamilyControls/FamilyActivityPicker",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Family Controls"
    ],
    "preciseIdentifier" : "s:14FamilyControls0A14ActivityPickerV"
  },
  "title" : "FamilyActivityPicker"
}
-->

# FamilyActivityPicker

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

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

## Overview

To prompt the user for their selection,
create a binding to a [`FamilyActivitySelection`](/documentation/FamilyControls/FamilyActivitySelection) instance,
and use the binding to create a [`FamilyActivityPicker`](/documentation/FamilyControls/FamilyActivityPicker) instance.
You can then display the picker like any SwiftUI view.

```swift
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 <doc://com.apple.documentation/documentation/SwiftUI/View/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`.

```swift
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 <doc://com.apple.documentation/documentation/ManagedSettings>
and <doc://com.apple.documentation/documentation/DeviceActivity> frameworks.

## Topics

### Creating activity pickers

[`init(selection:)`](/documentation/FamilyControls/FamilyActivityPicker/init(selection:))

Creates a new activity picker.

[`init(headerText:footerText:selection:)`](/documentation/FamilyControls/FamilyActivityPicker/init(headerText:footerText:selection:))

Creates a new activity picker with optional header and footer text.

  <doc://com.apple.documentation/documentation/SwiftUI/View/familyActivityPicker(title:headerText:footerText:isPresented:selection:)>

### Accessing the content

[`body`](/documentation/FamilyControls/FamilyActivityPicker/body)

The content of this view.

### Adding view modifiers

[View Modifiers](/documentation/FamilyControls/FamilyActivityPicker-View-Modifiers)

Apply standard modifiers to configure the family activity picker view
and the views it contains.

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`View`](/documentation/SwiftUI/View)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)