Declared Age Range API: iOS/macOS support

While preparing my app for Declared Age Range capability usage, I've noticed a weird behaviour: the same code works for iOS, but not for macOS.

My project uses same target for both platforms, so the capability is enabled for both platforms. The business logic layer is also shared across between platforms. Both UI layers are writter in SwiftUI.

The iCloud account used for testing on iOS and macOS devices is the same, so even the consent is shared across both devices.

While requestAgeRange(ageGates:) seems to work just fine for iOS app, for macOS app it always throws Not available error (DeclaredAgeRange.AgeRangeService.Error.notAvailable)

Am I missing something? Could the API be somehow unavailable for macOS? Should I use AgeRangeService.shared.requestAgeRange(ageGates:in:) for macOS instead of SwiftUI's @Environment-based approach?

Also, after giving permission, is there a way to actually revoke it? In Age Range for Apps menu I can only view the list of apps that have my consent to share my age range, but not the ability to revoke it.

Answered by DTS Engineer in 869747022

Hi @oleksiikaharov,

You wrote:

While requestAgeRange(ageGates:) seems to work just fine for iOS app, for macOS app it always throws Not available error (DeclaredAgeRange.AgeRangeService.Error.notAvailable)

Where required, Apple uses age assurance methods to confirm an Apple Account holder’s age, and share age categories with you through the Declared Age Range API. Where legally required, you must check the age of the people using your app, starting with new Apple Accounts created in Texas on or after January 1, 2026, which has obligations only for iOS and iPadOS apps. To learn more, see Next steps for apps distributed in Texas.

Then, you wrote:

Also, after giving permission, is there a way to actually revoke it? In Age Range for Apps menu I can only view the list of apps that have my consent to share my age range, but not the ability to revoke it.

To test content revocation in Sandbox on iOS and iPadOS 26.2 and later, please see the documentation below:

Testing Age Assurance in Sandbox

https://developer.apple.com/documentation/storekit/testing-age-assurance-in-sandbox

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

Accepted Answer

Hi @oleksiikaharov,

You wrote:

While requestAgeRange(ageGates:) seems to work just fine for iOS app, for macOS app it always throws Not available error (DeclaredAgeRange.AgeRangeService.Error.notAvailable)

Where required, Apple uses age assurance methods to confirm an Apple Account holder’s age, and share age categories with you through the Declared Age Range API. Where legally required, you must check the age of the people using your app, starting with new Apple Accounts created in Texas on or after January 1, 2026, which has obligations only for iOS and iPadOS apps. To learn more, see Next steps for apps distributed in Texas.

Then, you wrote:

Also, after giving permission, is there a way to actually revoke it? In Age Range for Apps menu I can only view the list of apps that have my consent to share my age range, but not the ability to revoke it.

To test content revocation in Sandbox on iOS and iPadOS 26.2 and later, please see the documentation below:

Testing Age Assurance in Sandbox

https://developer.apple.com/documentation/storekit/testing-age-assurance-in-sandbox

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

@DTS Engineer thanks for your reply! Though most of the info is clear, I find some insights worth additional clarifying:

  • based on your reply, is it correct that as of now there is no requirement to implement Declared Age Range API for macOS apps?

  • based on your reply, is it correct that this policy applies ** only to the new** Apple Accounts, created in TX after Jan 1st 2026 (as well as UT, LA, after their respective deadline dates)?

Declared Age Range API: iOS/macOS support
 
 
Q