Everyone,   I have done a lot of mundane trouble shooting steps with no success.   The post title indicates an error in this line of code: window?.rootViewController = UINavigationController(rootViewController: ViewController) from AppDelegate.swift.   Its like some part of the default UIViewController class is missing.…

I am new to Swift and xcode.  I have been saving my project with Version Control using Bitbucket.   I managed to delete several of my files from my project including .plist.  From trash I tried to copy all files into the project, but the…

I can’t seem to figure out how to solve this error. I’m getting it from this line:   let allImageDirectories = try! fileManager.contentsOfDirectory(atPath: documentDirectory)       Full Function:       func createArrayData()->[FolderCell]{                     var folderCells: [FolderCell] = []                     let documentDirectory = FileManager.default.urls(for: .documentDirectory,…

Hi, I have done some changes to my project (see link for more info). As a consequence of this, I´m having trouble writing data to Firebase.   I have this Struct: struct CartItem {     var name: String = “”     var count = Int()…

class SomeClass {      var dates: [Date] {           get {                return ckRecord.object(forKey: “dates”) as! [Date]           }           set(newDates) {                ckRecord.setObject(newDates as! CKRecordValue, “dates”)           }      } }       In the previous code, how do I write code in the get…