Clicky

iOS Dev Nugget 301 Print App Document Path II

.

Need to run a code review on your codebase? Hire me

I have written about printing out the document directory in #172, but here's a obvious tweak on hindsight, along with updates for current Swift language changes:

#if DEBUG
    let docPath = FileManager.default.urls(for: FileManager.SearchPathDirectory.documentDirectory, in: FileManager.SearchPathDomainMask.userDomainMask).last?.path
    print("docPath: \(docPath)")
#endif

.

.

Like this and want such iOS dev nuggets to be emailed to you, weekly?

Sign Me Up! or follow @iosdevnuggets on Twitter

.

View archives of past issues