This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Expo AgeRange
A library that provides access to age range information using Play Age Signals API on Android and Declared Age Range framework on iOS.
This library is currently in alpha and will frequently experience breaking changes.
expo-age-range provides access to user age range information. It uses Google's Play Age Signals API on Android and Apple's Declared Age Range framework on iOS.
This library allows you to request age range information from your app users to help you comply with age-appropriate content regulations (such as in Texas, USA) and provide age-appropriate experiences in your app.
Limitations
We strongly recommend testing the functionality on a real device, as simulator runtimes may not work as expected.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Configuration in app config
Setup iOS project
To use the age range API on iOS, you need to build your project with Xcode 26.0 or later. The com.apple.developer.declared-age-range entitlement is required. Add it to your app config file:
Are you using this library in an existing React Native app?
For existing React Native projects, add the entitlement to your project's ios/[app]/[app].entitlements file:
<key>com.apple.developer.declared-age-range</key> <true/>
Usage
Additional resources
- Play Age Signals API: Android documentation for age signals
- Declared Age Range framework: iOS documentation for declared age range
API
import * as AgeRange from 'expo-age-range';
No API data file found, sorry!
Error codes
Available in the code property of any error thrown by the native module. For Android-specific error codes, see "Handle API error codes" in Use Play Age Signals API docs.