We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CoreDataModel init method storeType defaults to a SQLite DB using the Documents Directory URL: storeType: StoreType = .SQLite(DocumentsDirectoryURL())
CoreDataModel
storeType: StoreType = .SQLite(DocumentsDirectoryURL())
On tvOS, the Document Directory is not available and it would be a nice enhancement to have the init method default to the Caches Directory.
A proposal would be to refactor DocumentsDirectoryURL() to DirectoryURL() and add an availability check when creating the directory URL:
DocumentsDirectoryURL()
DirectoryURL()
var searchPathDirectory = .DocumentDirectory #if os(tvOS) searchPathDirectory = .CachesDirectory #endif return try NSFileManager.defaultManager().URLForDirectory(searchPathDirectory, ...)
The text was updated successfully, but these errors were encountered:
Hey @cgoldsby ! 😄
Sounds like a great idea. Would you like to submit a pull request?
If so, let's call it DefaultDirectoryURL().
DefaultDirectoryURL()
Sorry, something went wrong.
Will do.
c467b84
jessesquires
No branches or pull requests
CoreDataModel
init method storeType defaults to a SQLite DB using the Documents Directory URL:storeType: StoreType = .SQLite(DocumentsDirectoryURL())
On tvOS, the Document Directory is not available and it would be a nice enhancement to have the init method default to the Caches Directory.
A proposal would be to refactor
DocumentsDirectoryURL()
toDirectoryURL()
and add an availability check when creating the directory URL:The text was updated successfully, but these errors were encountered: