event.significantUpdate

Type Event
Revision Release 2025.3721
Keywords significant update, parental approval, app updates, significantUpdateEvent
See also plugin.ageRange.requestSignificantUpdatePermission()
plugin.ageRange.*

Overview

Significant update event dispatched in response to plugin.ageRange.requestSignificantUpdatePermission().

Properties

event.name

String. The string "significantUpdateEvent".


event.isError

Boolean. true if an error occurred, false otherwise.


event.description

String. The update description provided when requesting permission.


event.questionSent

Boolean. true if the permission request was successfully sent to the parent/guardian. iOS only.


event.isBackgroundResponse

Boolean. true if this is an asynchronous response from a parent/guardian. iOS only.


event.approved

Boolean. true if the parent/guardian approved the update, false if denied.

iOS: Present when isBackgroundResponse is true Android: Indicates current approval status


event.pending

Boolean. true if approval is pending. Android only.

Corresponds to SUPERVISED_APPROVAL_PENDING status.


event.denied

Boolean. true if approval was denied. Android only.

Corresponds to SUPERVISED_APPROVAL_DENIED status.


event.platform

String. Platform identifier: "android" or "ios".


event.store

String. App store identifier. Currently only "google" for Android.


event.message

String. Platform-specific informational message.

Android: Explains that updates must be submitted through Play Console rather than requested at runtime.


event.mostRecentApprovalDate

Number. Timestamp (milliseconds since Unix epoch) of most recent approval. Android only.


event.errorMessage

String. Error description if isError is true.


Example

local function ageRangeListener(event)
    if event.name == "significantUpdateEvent" then
        print("Platform:", event.platform or "ios")
        
        if event.platform == "android" then
            print("Message:", event.message)
            
            if event.approved then
                print("Previously approved")
                if event.mostRecentApprovalDate then
                    local date = os.date("%c", event.mostRecentApprovalDate/1000)
                    print("Approved on:", date)
                end
            elseif event.pending then
                print("Approval pending")
            elseif event.denied then
                print("Approval denied")
            end
            
        else
            -- iOS
            if event.questionSent then
                print("Request sent to parent")
                print("Description:", event.description)
                
            elseif event.isBackgroundResponse then
                if event.approved then
                    print("Parent approved update")
                else
                    print("Parent denied update")
                end
            end
        end
        
        if event.isError then
            print("Error:", event.errorMessage)
        end
    end
end