r/dotnetMAUI • • 29d ago

Showcase Testing Play Age Signals + Apple Declared Age Range in .NET MAUI (and a free open-source wrapper, preview)

Recently I asked how .NET teams are handling the new app-store age laws. The recurring pain point was testing, so here's what we learned, plus the library we built along the way.

Testing on iOS (Declared Age Range)

  • The Simulator doesn't give real values; you need a real iPhone on iOS 26.2+.
  • Turn on Developer Mode, then sign in to a Sandbox Apple Account under Settings > Developer.
  • Under the sandbox account's Age Assurance settings you can pick scenarios (under 13, 13–15, 16–17, 18+, Off), and requestAgeRange returns the matching range.
  • The app needs the Declared Age Range capability on its App ID and in its provisioning profile.

Testing on Android (Play Age Signals)

  • Google ships a FakeAgeSignalsManager for tests; the real manager only returns real signals for apps installed from Google Play (a sideloaded build gets "not shared").

The library (free, Apache-2.0, preview)

  • One API over both platforms: Declared Age Range (requestAgeRange and the 26.2/26.4 calls, weak-linked so apps still run on older iOS) and Play Age Signals.
  • Fakes in a separate Ageledger.Testing package, so you can unit-test your age logic without a device.
  • An optional local decision log with exactly five fields (no birthdates or device IDs). Off by default.

NuGet: dotnet add package Ageledger --prerelease

Repo: https://github.com/ageledger/ageledger

It's a preview. It has been run on one iPhone with the sandbox account and an Android phone, and the README lists exactly what isn't verified yet. It doesn't make an app compliant with anything, and it isn't legal advice. I'd like to hear whether it fits how your apps work, and what's missing.

9 Upvotes

1 comment sorted by