App Management (app)
app
API theo bản 1.1.248. Mở/đóng app theo Bundle ID và lấy thông tin ứng dụng/tiến trình. Backup, restore, backup_list, backup_delete, last_restored, next_restore, clear_data đã gỡ; file backup có sẵn được giữ.
30 functions
Lua 5.3
app.app.launch
app.launch(bid)Launch app by bundle identifier. Aliases: app.run(), app.open().
app.app.kill
app.kill(bid)Kill app by bundle identifier. Alias: app.close().
app.app.quit
app.quit(bid_or_pid_or_"*")Quit app by bundle ID, PID, or all user apps.
app.app.frontmost
app.frontmost()Get frontmost app bundle ID. Alias: app.front_bid().
app.app.front_pid
app.front_pid()Get frontmost app PID.
app.app.bundle_info
app.bundle_info(bid)Get detailed bundle information.
app.app.bundle_path
app.bundle_path(bid)Get app bundle path.
app.app.bundle_version
app.bundle_version(bid)Get app version string.
app.app.data_path
app.data_path(bid)Get app data container path.
app.app.installed
app.installed()List all installed app bundle IDs. Alias: app.bundles().
app.app.is_running
app.is_running(bid)Check if app is running.
app.app.open_url
app.open_url(url)Open URL (launches associated app).
app.app.set_tcc
app.set_tcc(bid, service, allowed)Set TCC privacy permission for app.
app.app.install
app.install(ipa_path)Install IPA file.
app.app.uninstall
app.uninstall(bid)Uninstall app.
app.app.running
app.running()Get list of currently running app bundle IDs via App IPC (app-running).
app.app.group_info
app.group_info(bid)Get app group container URLs via LSApplicationProxy.groupContainerURLs.
app.app.plugin_info
app.plugin_info(bid)Get app extension/plugin container info via LSApplicationProxy.plugInKitPlugins.
app.app.localized_name
app.localized_name(bid)Get app's localized display name via LSApplicationProxy.localizedName.
app.app.png_data_for_bid
app.png_data_for_bid(bid)Get app icon as raw PNG binary data. Tries SBSCopyIconImagePNGDataForDisplayIdentifier first, falls back to reading icon…
app.app.pid_for_bid
app.pid_for_bid(bid)Get PID of running app by bundle ID. Reads CFBundleExecutable from Info.plist, searches process list via sysctl. Handles…
app.app.used_memory
app.used_memory(target)Get resident memory usage of an app in MB. Uses task_for_pid + task_info(TASK_BASIC_INFO).
app.app.all_procs
app.all_procs()Get list of all running processes. Enumerates via sysctl(KERN_PROC_ALL).
app.app.pop_banner
app.pop_banner(title, body)Show notification banner via App IPC (notification:title\tbody).
app.app.lsof
app.lsof(target)List open files for a process using proc_pidinfo(PROC_PIDLISTFDS) + proc_pidfdinfo(PROC_PIDFDVNODEPATHINFO).
app.app.open
app.open(bid)Alias của app.launch. Launch app by bundle identifier. Aliases: app.run(), app.open().
app.app.run
app.run(bid)Alias của app.launch. Launch app by bundle identifier. Aliases: app.run(), app.open().
app.app.close
app.close(bid)Alias của app.kill. Kill app by bundle identifier. Alias: app.close().
app.app.front_bid
app.front_bid()Alias của app.frontmost. Get frontmost app bundle ID. Alias: app.front_bid().
app.app.bundles
app.bundles()Alias của app.installed. List all installed app bundle IDs. Alias: app.bundles().