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 ↗Chapters
Code shown on screen · 7 snippets
Tailor your UI for children
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
import PermissionKit
var question = PermissionQuestion(handles: [
CommunicationHandle(value: "dragonslayer42", kind: .custom),
CommunicationHandle(value: "progamer67", kind: .custom)
]) Create a question - additional metadata
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
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
import PermissionKit
import UIKit
try await CommunicationLimits.current.ask(question, in: viewController) Ask a question - AppKit
import PermissionKit
import AppKit
try await CommunicationLimits.current.ask(question, in: window) Parent/guardian responses
import PermissionKit
import SwiftUI
struct ChatsView: View {
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
Related sessions
-
14 min