got following error with this code:
Code:
lazyvar documentDir = URL {
let allUrls = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)
return allUrls[0]
}()
Fehler:
Unable to infer complex closure return type; add explicit type to disambiguate
Insert ' () -> URL in ' FIX
When I'm clicking on Fix another error occurs:
Cannot invoke initializer for type 'URL' with an argument list of type '(() -> URL)'
How to solve this Problem? I'm using a CoreData Project