Contents

ageRatingCode

The current age rating code for your app.

Declaration

static var ageRatingCode: Int? { get async }

Return Value

An integer representing the current age rating code, or nil if the age rating is unavailable.

Discussion

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.

The following is an example of getting the age rating for an app:

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

If your app’s age rating has changed, consider informing parents or guardians by using the Significant Change API.