Skip to content

Instantly share code, notes, and snippets.

@agiletortoise
Last active August 29, 2015 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agiletortoise/c93f95f371d0d843f14d to your computer and use it in GitHub Desktop.
Save agiletortoise/c93f95f371d0d843f14d to your computer and use it in GitHub Desktop.
// add "-DDEBUG" to Build Settings > Swift Compiler flags > Other Swift Flags
// stick this code in didFinishLaunchingWithOptions
// then you can easily locate the iOS Sim's app documents directory to check on files.
#if DEBUG
let dirPath = NSFileManager.defaultManager().URLsForDirectory(NSSearchPathDirectory.DocumentDirectory, inDomains: NSSearchPathDomainMask.UserDomainMask).last?.path
print(dirPath)
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment