Skip to main content

Get front app bundle id (app.front_bid)

Declaration

bid = app.front_bid()

Returns

  • bid
    String. The bundle id of the foreground app.
    Returns "com.apple.springboard" if no app is in foreground but SpringBoard is loaded.
    Returns "com.apple.backboardd" if no app is in foreground and SpringBoard hasn't started.

Notes

  • Get the bundle id of the foreground app.

Example

local bid = app.front_bid()
sys.alert("Foreground app bundle id: "..bid)

Note: uses non-chapter API sys.alert.