0

enter image description here

@UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?
lazy var  coreDataStack = CoreDataStack()

func getSavePathsForListWithName(_ name: String) -> String {
    let pathsArray = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.documentDirectory, FileManager.SearchPathDomainMask.userDomainMask, true)
    let documentDirectory = pathsArray[0] 
    return documentDirectory.stringByAppendingPathComponent(name)}// Getting error in this line

I'm converting swift 1.2 to swift 3.2 but getting this error. i have replaced stringByAppendingPathComponent with URLByAppendingPathCompont but not working.

can some one please help me i'm facing this problem, it will be great help me, thanks in advance.

`

Anbu.Karthik
  • 82,064
  • 23
  • 174
  • 143
iOSDude
  • 274
  • 2
  • 25

0 Answers0