Jake Jake - 4 months ago 44
Swift Question

FileManager.urls returning error

I recently converted my project to Swift 3 and for the most part, it seems okay. However, I receive an error related to FileManager that says:
"Use of instance member 'urls' on type 'FileManager'; did you mean to use a value of type 'FileManager' instead?"

This error makes no sense to me. Here is a picture

static let DocumentsDirectory = FileManager.urls(for: .DocumentDirectory, in: .userDomainMask).first!


You need to call the urls method on an instance of FileManager, not on the class itself.

Change it to: