Is there any way to browse the file system of a currently running or just killed iOS simulator? I\'d settle for being able to see a specific app\'s files if there\'s a way t
For Swift 4.2 and higher, print an easy to use path:
#if targetEnvironment(simulator)
print("::::: SIMULATOR :::::")
if let documentsPath = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first?.path {
print("App Documents Directory:\n\(documentsPath)\n")
}
#endif
... in a source code location such as:
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// ...
return true
}
Use the resulting path with cd or open on the terminal command line. Or, paste the path in the shift-cmd-G "Go To Folder…" Finder prompt.
Related answer which includes older language versions: Document Directory Path of iOS 8 Beta Simulator