Skip to content

Commit

Permalink
fix: fixed sqlite db path on the tvos platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
Desu Sai Venkat committed Nov 16, 2023
1 parent 1f06a1e commit 7ec186d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/Classes/Utility/RSUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ struct RSUtils {
}

static func getDBPath() -> String {
#if os(tvOS)
let urlDirectory = FileManager.default.urls(for: FileManager.SearchPathDirectory.cachesDirectory, in: FileManager.SearchPathDomainMask.userDomainMask)[0]
#else
let urlDirectory = FileManager.default.urls(for: FileManager.SearchPathDirectory.libraryDirectory, in: FileManager.SearchPathDomainMask.userDomainMask)[0]
#endif
let fileUrl = urlDirectory.appendingPathComponent("rl_persistence.sqlite")
return fileUrl.path
}
Expand Down

0 comments on commit 7ec186d

Please sign in to comment.