Dunfey · Hotel WWDC as data, est. 1983
Front desk everything
Years
Topics

2025 App ServicesPrivacy & Security

WWDC25 · 12 min · App Services / Privacy & Security

Enhance child safety with PermissionKit

Discover how PermissionKit helps you enhance communication safety for children in your app. We’ll show you how to use this new framework to create age-appropriate communication experiences and leverage Family Sharing for parental approvals. You’ll learn how to build permission requests that seamlessly integrate with Messages, handle parental responses, and adapt your UI for child users. To get the most out of this session, we recommend first watching “Deliver age-appropriate experiences in your app” from WWDC25.

Watch at developer.apple.com ↗

Transcript all transcripts

Chapters

  • 0:00 — Introduction
  • 2:40 — Meet PermissionKit
  • 3:26 — Tailor your UI for children
  • 4:38 — Create an “ask” experience
  • 7:02 — Parent/guardian responses
  • 10:27 — More ways to keep kids safe

Code shown on screen · 7 snippets

Tailor your UI for children swift · at 4:03 ↗
import PermissionKit

let knownHandles = await CommunicationLimits.current.knownHandles(in: conversation.participants)

if knownHandles.isSuperset(of: conversation.participants) {
    // Show content
} else {
    // Hide content
}
Create a question swift · at 5:15 ↗
import PermissionKit

var question = PermissionQuestion(handles: [
    CommunicationHandle(value: "dragonslayer42", kind: .custom),
    CommunicationHandle(value: "progamer67", kind: .custom)
])
Create a question - additional metadata swift · at 5:38 ↗
import PermissionKit

let people = [
    PersonInformation(
        handle: CommunicationHandle(value: "dragonslayer42", kind: .custom),
        nameComponents: nameComponents,
        avatarImage: profilePic
    ),
    PersonInformation(
        handle: CommunicationHandle(value: "progamer67", kind: .custom)
    )
]

var topic = CommunicationTopic(personInformation: people)
topic.actions = [.message]

var question = PermissionQuestion(communicationTopic: topic)
Ask a question - SwiftUI swift · at 6:25 ↗
import PermissionKit
import SwiftUI

struct ContentView: View {
    let question: PermissionQuestion<CommunicationTopic>

    var body: some View {
        // ...
        CommunicationLimitsButton(question: question) {
            Label("Ask Permission", systemImage: "paperplane")
        }
    }
}
Ask a question - UIKit swift · at 6:43 ↗
import PermissionKit
import UIKit

try await CommunicationLimits.current.ask(question, in: viewController)
Ask a question - AppKit swift · at 6:54 ↗
import PermissionKit
import AppKit

try await CommunicationLimits.current.ask(question, in: window)
Parent/guardian responses swift · at 7:19 ↗
import PermissionKit
import SwiftUI

struct ChatsView: View {
    @State var isShowingResponseAlert = false

    var body: some View {
        List {
           // ...
        }
        .task {
            let updates = CommunicationLimits.current.updates
            for await update in updates {
                // Received a response!
                self.isShowingResponseAlert = true
            }
        }
    }
}

Resources