Skip to content

Instantly share code, notes, and snippets.

@yccheok
Created July 9, 2021 10:45
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 yccheok/95c0457e4187ca8c7e962b5899890212 to your computer and use it in GitHub Desktop.
Save yccheok/95c0457e4187ca8c7e962b5899890212 to your computer and use it in GitHub Desktop.
find out the location of SQLite file in iOS
func getCoreDataDBPath() {
let path = FileManager
.default
.urls(for: .applicationSupportDirectory, in: .userDomainMask)
.last?
.absoluteString
.replacingOccurrences(of: "file://", with: "")
.removingPercentEncoding
print("Core Data DB Path :: \(path ?? "Not found")")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment