When including Mattress via CocoaPods and manually specifying the SWIFT_VERSION to 2.3, I get a compilation error with DiskCache.diskPath() (line 457):
if !NSFileManager.defaultManager().fileExistsAtPath(fileURL.absoluteString, isDirectory: &isDir) {
...
}
The issue stems from the fact that NSFileManager.fileExistsAtPath(...) accepts a non-optional string, so fileURL.absoluteString has to be unwrapped.
I pushed a fix to my own fork and raised a PR - just not too sure if my solution is the most ideal given the rest of the context of DiskCache. Let me know what you think 👍
When including
Mattress
via CocoaPods and manually specifying theSWIFT_VERSION
to 2.3, I get a compilation error withDiskCache.diskPath()
(line 457):The issue stems from the fact that
NSFileManager.fileExistsAtPath(...)
accepts a non-optional string, sofileURL.absoluteString
has to be unwrapped.I pushed a fix to my own fork and raised a PR - just not too sure if my solution is the most ideal given the rest of the context of
DiskCache
. Let me know what you think 👍