Skip to main content

Callbacks & Events

The Airborne SDK reports its progress to your app through a set of callbacks and a stream of structured events. Use them to know when boot is ready, to monitor release health, and to react as lazy-downloaded files become available. The callbacks are the same on Android (AirborneInterface) and iOS (AirborneDelegate); see the Android API and iOS API references for exact signatures.

Callback concepts​

Boot completion — the SDK signals that boot has finished and the bundle is ready. On native this is the startApp callback (startApp(indexPath:) on Android, startApp(indexBundleURL:) on iOS). In React Native, instead of a callback the SDK blocks the getJSBundle function until the bundle is resolved, so React Native naturally boots from the right path.

Tracker callback — the SDK delivers a series of events to the integrating app via onEvent. These let you monitor metrics across the release lifecycle and report errors. The full set is catalogued below.

Lazy download callback — the SDK reports when specific lazy-downloaded files become available for use. On Android this is the LazyDownloadCallback (fileInstalled, lazySplitsInstalled); on iOS it is the onLazyPackageDownloadComplete and onAllLazyPackageDownloadsComplete delegate methods.

The onEvent payload​

Every event delivered to onEvent carries the same set of fields:

  • category — the broad category, e.g. lifecycle.
  • subCategory — the subcategory, e.g. hyperota (subcategory on iOS).
  • level — severity, e.g. info or error.
  • label — a category label for the event, e.g. ota_update.
  • key — the specific event identifier (e.g. boot).
  • value — a structured payload whose shape depends on the event.

The sections below list each event with its payload exactly as the SDK emits it.

Lifecycle events​

started​

Fired when the SDK has started initialization.

{
category: "lifecycle",
subCategory: "hyperota",
level: "info",
label: "first_time_setup",
key: "started",
value: {}
}

completed​

Fired when the SDK has completed initialization.

{
category: "lifecycle",
subCategory: "hyperota",
level: "info",
label: "first_time_setup",
key: "completed",
value: {}
}

init_with_local_config_versions​

Fired if the SDK boots with the local config version.

{
category: "lifecycle",
subCategory: "hyperota",
level: "info",
label: "ota_update",
key: "init_with_local_config_versions",
value: { app_update_id: "<UUID>" }
}

release_config_fetch​

Fired on release config download completion.

{
category: "lifecycle",
subCategory: "hyperota",
level: "info",
label: "ota_update",
key: "release_config_fetch",
value: {
release_config_url: "<url>",
status: 200,
time_taken: "<time_taken>",
app_update_id: "<UUID>"
}
}

package_update_download_started​

Fired when package download starts.

{
category: "lifecycle",
subCategory: "hyperota",
level: "info",
label: "ota_update",
key: "package_update_download_started",
value: {
package_version: "v6",
app_update_id: "<UUID>"
}
}

rc_version_updated​

Fired when a new release config is loaded.

{
category: "lifecycle",
subCategory: "hyperota",
level: "info",
label: "ota_update",
key: "rc_version_updated",
value: {
new_rc_version: "2",
app_update_id: "<UUID>"
}
}

config_updated​

Fired when a new config block is loaded.

{
category: "lifecycle",
subCategory: "hyperota",
level: "info",
label: "ota_update",
key: "config_updated",
value: { new_config_version: "v1", app_update_id: "<UUID>" }
}

package_update_result​

Fired on completion of package download.

{
category: "lifecycle",
subCategory: "hyperota",
level: "info",
label: "ota_update",
key: "package_update_result",
value: {
result: "SUCCESS",
package_version: "v6",
time_taken: 282,
app_update_id: "<UUID>"
}
}

updated_resources​

Fired on completion of resource download.

{
category: "lifecycle",
subCategory: "hyperota",
level: "info",
label: "ota_update",
key: "updated_resources",
value: { resources: "[]", app_update_id: "<UUID>" }
}

lazy_package_update_info​

Fired on completion of lazy block download.

{
category: "lifecycle",
subCategory: "hyperota",
level: "info",
label: "ota_update",
key: "lazy_package_update_info",
value: { package_splits_download: "No updates in app", app_update_id: "<UUID>" }
}

end​

Fired on completion of all downloads.

{
category: "lifecycle",
subCategory: "hyperota",
level: "info",
label: "ota_update",
key: "end",
value: { time_taken: 319, app_update_id: "<UUID>" }
}

boot​

Fired on triggering the boot callback.

{
category: "lifecycle",
subCategory: "hyperota",
level: "info",
label: "ApplicationManager",
key: "boot",
value: {
release_config_version: "2",
config_version: "v1",
package_version: "v6",
resource_versions: [],
time_taken: 363
}
}

Error events​

read_release_config_error​

Fired when there is an error downloading the release config.

{
category: "lifecycle",
subCategory: "hyperota",
level: "error",
label: "ApplicationManager",
key: "read_release_config_error",
value: { error: "<Stack trace>" }
}

See also​

  • Android API — AirborneInterface.onEvent and the lazy download callback.
  • iOS API — AirborneDelegate.onEvent and the lazy package callbacks.
  • JavaScript API — reading the release config and bundle from JS.