0

I am having a problem within my AppDelegate but can't find the mistake, I checked the bundle identifier but it still doesn't work, there is my code :

lazy var applicationDocumentsDirectory: NSURL = {
    let urls = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)
    return urls[urls.count-1] as NSURL
}()

lazy var managedObjectModel: NSManagedObjectModel = {
    let modelURL = Bundle.main.url(forResource: "koalak", withExtension: "momd")!
    return NSManagedObjectModel(contentsOf: modelURL)!
}()

A screenshot of the Error I get :

 EXC_BAD_INSTRUCTION Error Screenshot

enter image description here

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • See http://stackoverflow.com/questions/40393315/what-does-error-thread-1exc-bad-instruction-code-exc-i386-invop-subcode-0x0 Are you in the same class or something? – rmaddy Nov 03 '16 at 04:37
  • Hi, could you please explain me what do you mean by same class ? Thanks –  Nov 03 '16 at 05:19

0 Answers0