AgeRangeService
A request for the age range of a person logged onto the current device.
Declaration
struct AgeRangeServiceOverview
Use AgeRangeService to request a person’s age range and manage their access to content on your app. This service enables you to create age-appropriate experiences while respecting people’s privacy and meeting regulatory requirements. The system presents an interface that describes the data you’re requesting and asks people to grant permission to share their age range with your app.
The following code demonstrates how to request a person’s age range and determine what content to display on your app’s landing page based on their age group:
The system may override your age gates based on the local regulations of the person’s geographic location. Age ranges provide the minimum information necessary for content decisions while protecting privacy. Parental controls and family sharing settings may affect the availability and accuracy of age information.
Topics
Retrieving the shared instance
Getting the age range
AgeRangeService.AgeRangeDeclarationAgeRangeService.AgeRangerequestAgeRange(ageGates:_:_:in:)requestAgeRange(ageGates:_:_:in:)AgeRangeService.ResponseAgeRangeService.ParentalControls