-1

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!
Léo Natan
  • 56,823
  • 9
  • 150
  • 195
Jake
  • 801
  • 1
  • 6
  • 10

1 Answers1

2

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

Change it to:

FileManager.default.urls(...
rmaddy
  • 314,917
  • 42
  • 532
  • 579