AppStore.ageRatingCode always returns 0 on real device — is this expected behavior?

Hello everyone

I'm implementing age verification in my app to comply with upcoming age assurance laws (Utah, etc.), and I'm using AppStore.ageRatingCode from StoreKit to retrieve my app's current age rating.

According to the documentation:

extension AppStore {
    @available(iOS 26.2, macOS 26.2, tvOS 26.2, watchOS 26.2, *)
    public static var ageRatingCode: Int? { get async }
}

"Use this property to fetch the age rating for your app and compare it with the last known age rating to check if it has changed."

However, calling this always returns 0 in my environment.

Environment:

  • Device: Real physical device (not simulator)
  • iOS version: 26.4
  • Sandbox Apple Account: signed in via Settings → Developer → Sandbox Apple Account
  • App Store Connect: app is registered and age rating is configured
  • Xcode Scheme → Run → Options → StoreKit Configuration: None

Code:

func getAgeRatingCode() async -> Int? {
    guard let ageRatingCode = await AppStore.ageRatingCode else {
        print("Age rating code unavailable")
        return nil
    }
    print("ageRatingCode: \(ageRatingCode)") // always prints 0
    return ageRatingCode
}

Questions:

  1. What integer values does ageRatingCode map to? (e.g., does 4+ = 4, 9+ = 9, 13+ = 13, etc.? Or is it a different internal code?) This mapping is not documented anywhere I can find.

  2. Is 0 a valid return value, and if so, what does it represent?

  3. Is there a known issue with this API returning 0 even when all conditions appear to be correctly configured?

Any guidance from Apple engineers or developers who have successfully used this API would be greatly appreciated.

Answered by Apple Staff in 897580022

Hi Joycity, thank you for your question!

The ageRatingCode API should be used to observe changes to your app's age rating over time by comparing to its last known value. If your app's age rating code has changed, consider informing parents or guardians by using the Significant Change API.

A value of 0 is expected during development of your app when it is built and run from Xcode and Sandbox environments (including TestFlight).

Hi Joycity, thank you for your question!

The ageRatingCode API should be used to observe changes to your app's age rating over time by comparing to its last known value. If your app's age rating code has changed, consider informing parents or guardians by using the Significant Change API.

A value of 0 is expected during development of your app when it is built and run from Xcode and Sandbox environments (including TestFlight).

AppStore.ageRatingCode always returns 0 on real device — is this expected behavior?
 
 
Q