We can find the document directory in the following ways:
iOS 16+
let documentDirectory = URL.documentsDirectory
print("App's document directory: \(documentDirectory)")
You would get something like:
For older iOS versions you can use:
print(FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!.path)