NAME
mobile.h - Native mobile AOT lifecycle C ABI (Android arm64-v8a & iOS arm64).
SYNOPSIS
Classes
Configuration passed by the native mobile shell to bark_mobile_boot().
Fixed-size 128-byte mobile runtime & attestation status snapshot.
Typedefs
Configuration passed by the native mobile shell to bark_mobile_boot().
Fixed-size 128-byte mobile runtime & attestation status snapshot.
Enumerations
Feature/hardening flags for bark_mobile_config_t.
Functions
Initialize mobile session, hardware keychain, anti-tamper baseline, and app hooks.
Advance one 60Hz native frame: check lease/integrity, poll, flush, and present.
Notify runtime that the mobile app entered background (pauses render & wipes volatile state).
Notify runtime that the mobile app returned to foreground and re-verify live code integrity.
Verify and install an Ed25519-signed lease response blob and notify on_ticket().
Revoke/clear the active lease and wipe session DEK + ticket immediately.
Build an 80-byte keyed integrity heartbeat response for an 80-byte server challenge.
Copy the current 128-byte mobile runtime status snapshot into out.
Copy the hardware-bound 32-byte X25519 device public key into out_pk.
Destroy application state, wipe secrets, and close the hardware keychain.
Detailed Description
Native mobile AOT lifecycle C ABI (Android arm64-v8a & iOS arm64).
Used by the thin Android JNI and iOS Objective-C/Swift native shells to drive any Bark application compiled with -DBARK_MOBILE_AOT without WebView, WASM, or dynamic PROT_EXEC/MAP_JIT code loading.
Enumeration Type Documentation
enum bark_mobile_cfg_flags
Feature/hardening flags for bark_mobile_config_t.
Enumerator
- BARK_MOBILE_CFG_REQUIRE_APK_CERT
- Fail-closed if APK signing cert != expected_apk_cert_sha256.
- BARK_MOBILE_CFG_REQUIRE_NO_DEBUGGER
- Taint session if debugger/ptrace is attached.
- BARK_MOBILE_CFG_ENABLE_ANTI_DEBUG
- Activate OS anti-debug (PT_DENY_ATTACH / PR_SET_DUMPABLE=0).
- BARK_MOBILE_CFG_REQUIRE_LEASE
- Gate step() on active non-expired untainted lease (offline-brick).
Function Documentation
int bark_mobile_step (uint64_t now_sec)
Advance one 60Hz native frame: check lease/integrity, poll, flush, and present.
Returns
0 normal frame, 1 quit requested, -2 lease required/expired/tainted (offline-brick), -1 invalid.
Author
Generated automatically by Doxygen for Bark from the source code.