当我在Xcode 6时我没有问题,但现在我已经下载了6.1版本,我的应用程序崩溃了。我调试了我的应用程序,发现问题出在这里:
lazy var managedObjectContext: NSManagedObjectContext? = {
// Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.) This property is optional since there are legitimate error conditions that could cause the creation of the context to fail.
let coordinator = self.persistentStoreCoordinator
if coordinator == nil {
return nil
}
var managedObjectContext = NSManagedObjectContext()
managedObjectContext.persistentStoreCoordinator = coordinator
return managedObjectContext
}()
当我的应用程序输入此部分代码时,xcode说:
dyld`dyld_fatal_error:
0x2be220c4: trap //There is a breakpoint here
0x2be220c8: nop
有谁知道如何解决这个问题?