<!--
{
  "documentType" : "article",
  "framework" : "JournalingSuggestions",
  "identifier" : "/documentation/JournalingSuggestions/presenting-the-suggestions-picker-and-processing-a-selection",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Presenting the suggestions picker and processing a selection"
}
-->

# Presenting the suggestions picker and processing a selection

Display the journaling suggestions picker and process a suggestion that someone chooses.

## Overview

Present the [`JournalingSuggestionsPicker`](/documentation/JournalingSuggestions/JournalingSuggestionsPicker) to show people recent or important life events
as suggestions, which include information about an event such as images, videos, locations,
and so on. If a person selects a particular suggestion, the system provides you with the
event details in the completion handler.

Start by choosing the text for the button in your app that presents the picker. When a person taps the text,
the system presents the picker in a system process. The picker fills with suggestions that
draw upon various personal experiences, such as a place someone visited, a person they
connected with, a photo in their library, or a song that they often listened to.

When someone chooses a suggestion, the system makes high-level details about the event
available to your app. Define the suggestion picker’s `onCompletion` closure to process
the details, and incorporate them into your app’s creative workflow. A journaling app,
for example, might display a visual suggestion in the format of a photo with placeholder
text below it as the beginning of a new journal entry.

![A figure that features four iPhone device frames in an app workflow progressing from left to right. The first frame depicts a blank view and button that reads New Entry. A callout below reads Custom picker button. To the right, the next frame depicts several photos in a thumbnail view under text that reads Highlights from Photo Memories. A callout below reads Suggestions picker. The next frame to the right features the same photo thumbnails in a seletion list, with a thumbnail that featues a flower selected and a button below the list labeled Add to App 1. A callout below reads User selection. The final frame at the right depicts a detailed version of the same flower below user-defined text that reads Coastal Hike, followed by bars that represent a journal entry. A callout below reads Incorporated suggestion.](images/com.apple.JournalingSuggestions/presenting-the-suggestions-picker-and-processing-a-selection-1@2x.png)

Journaling Suggestions gathers information from the system through built-in apps
people use, such as Photos, Health, Fitness, Apple Podcasts, and Music.
Suggestions can also come from third party apps that provide data through frameworks such as <doc://com.apple.documentation/documentation/HealthKit>, <doc://com.apple.documentation/documentation/CallKit>, or <doc://com.apple.documentation/documentation/SiriKit>.

## Maintain user privacy

Adopting Journaling Suggestions delivers an enhanced privacy experience in your app.
When a person makes a selection in the picker, the system shares only the details of the
chosen suggestion with your app. Thus, your app accesses only the suggestion data that a
person explicitly authorizes.

When your app attempts to display the picker for the first time, a sheet appears that introduces
Journaling Suggestions. If the person taps Turn On Journaling Suggestions, the picker displays,
and includes an information privacy banner. The banner explains that your app only has access
to the suggestions the person chooses to write about or saves to the app. The person can tap
the X to close the banner, or they can tap Learn More, which presents a sheet that goes into
more detail about Private Access.

**Consent sheet:**

![A screenshot of the Journaling Suggestions consent sheet. Text that introduces the concept of Journaling Suggestions resides above a series of buttons. The first button reads About Journaling Suggestions & Privacy. The second reads Turn On Journaling Suggestions. And the last reads Customize.](images/com.apple.JournalingSuggestions/presenting-the-suggestions-picker-and-processing-a-selection-2~dark@2x.png)

**Privacy banner:**

![A screenshot of the journaling suggestions picker that features a privacy banner. A title in the banner reads Private Access to Suggestions,  there's an X button to the right of the title. Below the title reads Journal only has access to the suggestions you choose to write about. A button below reads Learn More.](images/com.apple.JournalingSuggestions/presenting-the-suggestions-picker-and-processing-a-selection-3@2x.png)

**Private Access sheet:**

![A screenshot of the Private Access sheet. A title at top reads Private Access & Suggestions. Related explanatory text follows with a Done button that resides at bottom.](images/com.apple.JournalingSuggestions/presenting-the-suggestions-picker-and-processing-a-selection-4@2x.png)

> Note: The Journaling Suggestions consent sheet displays once per device, so it doesn’t appear if the person already viewed
> it, either by launching Journal, or by launching another app that uses Journaling Suggestions.

Suggestion data requires careful handling. To further preserve user privacy, follow the advice outlined in the [Developer Program License Agreement](https://developer.apple.com/programs/apple-developer-program-license-agreement/#sensitive-content-analysis-framework).

## Add the Journaling Suggestions entitlement

To use Journaling Suggestions in your app, the  <doc://com.apple.documentation/documentation/BundleResources/Entitlements/com.apple.developer.journal.allow>
entitlement is required. The suggestions picker fails to present without it. You can can add this entitlement to your app by enabling the Journaling Suggestions capability in Xcode; see [Adding capabilities to your app](doc://com.apple.documentation/documentation/Xcode/adding-capabilities-to-your-app).

## Name the button that opens the suggestions picker

The [`JournalingSuggestionsPicker`](/documentation/JournalingSuggestions/JournalingSuggestionsPicker) initializers take an argument, `title`, for a button that people tap to display the picker.

```swift
let buttonTitle = "Show my personal events"
```

Choose a title that clearly describes the purpose of journaling suggestions in the context of your app. As an indication that personal moments are about to
display, it’s important to set a person’s expectations about what the picker shows after they tap the text.

## Declare and present a suggestions picker

To present a suggestions picker, declare a view that displays a button title. When a person taps the button, the system presents the picker. Upon dismissal, the system invokes the completion handler you specify.

```swift
struct Example: View {
    var body: some View <-
        SuggestionsPicker {
            Text(buttonTitle)
        } onCompletion: { suggestion in
            // Parse the selected suggestion.
        }}}
```

## Handle the selected suggestion data

The picker fills with suggestions that include various types of personal experiences. When a person makes a selection, the system provides the chosen suggestion to your app’s `onCompletion` handler. Check the `suggestion` argument’s [`items`](/documentation/JournalingSuggestions/JournalingSuggestion/items) property to process the selection. Each [`JournalingSuggestion.ItemContent`](/documentation/JournalingSuggestions/JournalingSuggestion/ItemContent) item conforms to [`JournalingSuggestionAsset`](/documentation/JournalingSuggestions/JournalingSuggestionAsset) and is one of following types:

|Type                                                                                                             |**Description**                                                                                                                                                                                 |
|-----------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|``doc://com.apple.JournalingSuggestions/documentation/JournalingSuggestions/JournalingSuggestion/Photo``         |An image from a person’s library, including the date captured.                                                                                                                                  |
|``doc://com.apple.JournalingSuggestions/documentation/JournalingSuggestions/JournalingSuggestion/Workout``       |Information about a workout that a person completes, including calories burnt, distance covered, a route they took, average heart rate, start and end time, and an icon for the type of workout.|
|``doc://com.apple.JournalingSuggestions/documentation/JournalingSuggestions/JournalingSuggestion/Contact``       |An interaction a person has with someone in their contacts, including their name and Contact photo.                                                                                             |
|``doc://com.apple.JournalingSuggestions/documentation/JournalingSuggestions/JournalingSuggestion/Location``      |A place that a person visited, including its name, surrounding city, and geographic coordinates, if available.                                                                                  |
|``doc://com.apple.JournalingSuggestions/documentation/JournalingSuggestions/JournalingSuggestion/Song``          |The name of a song that a person plays, including the artist, album, and album artwork.                                                                                                         |
|``doc://com.apple.JournalingSuggestions/documentation/JournalingSuggestions/JournalingSuggestion/Podcast``       |Information about a podcast that a person plays, including the show, artist, episode, and associated artwork.                                                                                   |
|``doc://com.apple.JournalingSuggestions/documentation/JournalingSuggestions/JournalingSuggestion/Video``         |A video from a person’s library, including the date captured.                                                                                                                                   |
|``doc://com.apple.JournalingSuggestions/documentation/JournalingSuggestions/JournalingSuggestion/LivePhoto``     |An image and short video that represents a live photo from a person’s library, including the date captured.                                                                                     |
|``doc://com.apple.JournalingSuggestions/documentation/JournalingSuggestions/JournalingSuggestion/MotionActivity``|The number of steps a person takes in a motion event on iPhone, including an icon for the activity.                                                                                             |
|``doc://com.apple.JournalingSuggestions/documentation/JournalingSuggestions/JournalingSuggestion/GenericMedia``  |The media content a person listens to, including the information describing the media.                                                                                                          |
|``doc://com.apple.JournalingSuggestions/documentation/JournalingSuggestions/JournalingSuggestion/Reflection``    |A reflection prompt that a person chooses.                                                                                                                                                      |
|``doc://com.apple.JournalingSuggestions/documentation/JournalingSuggestions/JournalingSuggestion/StateOfMind``   |The state of mind reflection in the Health app that describes a persons emotions and moods.                                                                                                     |
|``doc://com.apple.JournalingSuggestions/documentation/JournalingSuggestions/JournalingSuggestion/EventPoster``   |Details about a planned or attented event in Apple Invites.                                                                                                                                     |

The following example demonstrates parsing a photo suggestion:

```swift
struct Example: View {
    @State var suggestionPhotos = [JournalingSuggestion.Photo]()
    @State var suggestionTitle: String? = nil
    var body: some View <-
        VStack {
            Spacer().frame(height: 25)
            SuggestionsPicker {
                Text(buttonTitle)
            } onCompletion: { suggestion in
                // Parse the suggestion details. 
                suggestionTitle = suggestion.title
                suggestionPhotos = await suggestion.content(forType: JournalingSuggestion.Photo.self)
            }
            // Display the suggestion details. 
            Spacer().frame(height: 25)
            Text(suggestionTitle ?? "")
            List {
                ForEach(suggestionPhotos, id: \.photo) { item in
                    AsyncImage(url: item.photo) { image in
                        image.image?
                            .resizable ()
                            .aspectRatio(contentMode: .fit)
                    }
                    .frame(maxHeight: 200)
                }}}}
```

The code displays the suggestion title, followed by a list of images that the person selected in the picker.

> Note: A person can control the types of suggestions available in the picker by tapping Customize in the consent sheet, or by adjusting Privacy & Security settings for Journaling Suggestions in the Settings app.

When your app parses a selected suggestion’s details, it organizes that information to serve as a base for creative expression. A journaling app, for example, might list the selected images in a journal entry.



![A device frame that depicts a journaling app. The app displays a view that features a flower a person chose in the suggestions picker. The flower resides below user-defined text that reads Coastal Hike. There are bars below the image that represent a user-defined journal entry, above a callout that reads My App 1.](images/com.apple.JournalingSuggestions/presenting-the-suggestions-picker-and-processing-a-selection-5~dark@2x.png)

---

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)