get Menu Items
Retrieves the dynamic menu items.
Each MenuItem may include ID, name, key, icon, action, and web URL. Items come in the reading order of the menu authored in AIDE, each carrying its section (id, title and layout), so hosts can render the page section by section.
Return
A list of MenuItem. May be empty if none are configured.
Throws
if retrieval fails.
Android (Kotlin)
lifecycleScope.launch {
try {
val menuItems = AFCore.userInterface().getMenuItems()
menuAdapter.submitList(menuItems)
} catch (t: Throwable) {
showError("Failed to load menu: ${t.message}")
}
}Content copied to clipboard
iOS (Swift)
Task {
do {
let menuItems = try await AFCore.shared.userInterface().getMenuItems()
self.updateMenu(menuItems)
} catch {
self.showError("Failed to load menu: \(error.localizedDescription)")
}
}Content copied to clipboard