Skip to content

Instantly share code, notes, and snippets.

@acoomans
Created April 22, 2019 15:33
Show Gist options
  • Save acoomans/c24cb544b05fef2edf8258cce59704a0 to your computer and use it in GitHub Desktop.
Save acoomans/c24cb544b05fef2edf8258cce59704a0 to your computer and use it in GitHub Desktop.
LLDB Python helper
def GetBundleIdentifier(debugger):
debugger.GetSelectedTarget().GetProcess().GetThreadAtIndex(0).GetSelectedFrame()
options = lldb.SBExpressionOptions()
options.SetLanguage(lldb.eLanguageTypeSwift)
bundle_identifier = frame.EvaluateExpression('Bundle.main.bundleIdentifier', options).description.translate(None, '"').strip()
if not bundle_identifier:
bundle_identifier = "no-bundle-id"
debug('bundle_identifier = ' + bundle_identifier)
return bundle_identifier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment