Skip to content

Instantly share code, notes, and snippets.

@Ashton-W
Created April 19, 2016 04:27
Show Gist options
  • Save Ashton-W/925d6ac21c9f86d88e4dc44c57faa55a to your computer and use it in GitHub Desktop.
Save Ashton-W/925d6ac21c9f86d88e4dc44c57faa55a to your computer and use it in GitHub Desktop.
LLDB sim_location command (lldbinit)
command alias sim_location expr (void)NSLog(@"Printing Simulator App Paths:\n\nBundle:\n%@\n\nDocuments:\n%@\n\n", [[NSBundle mainBundle] resourcePath], [[[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject] resourceSpecifier]);
@Ashton-W
Copy link
Author

Add to your ~/.lldbinit file and it will be available in all LLDB sessions, including in Xcode.

Usage

(lldb) sim_location

@Ashton-W
Copy link
Author

A better version of this exists in Chisel https://github.com/facebook/chisel pdocspath, I've opened a pull request to add pbundlepath too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment