mirror of
https://github.com/modo-studio/SugarRecord.git
synced 2024-08-16 18:00:26 +03:00
fixed documents directory for tvOS (#309)
This commit is contained in:
parent
b323ff93e1
commit
dfd492a5c9
@ -1,6 +1,10 @@
|
||||
import Foundation
|
||||
|
||||
func documentsDirectory() -> String {
|
||||
let paths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)
|
||||
#if os(tvOS)
|
||||
let paths = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true)
|
||||
#else
|
||||
let paths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)
|
||||
#endif
|
||||
return paths[0]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user