although i am new to swift, i've experience with both core data and fetched results controllers. so, i am perplexed that when i compile the code below, i get an error "Use of undeclared type 'NSFetchedResultsController'"
i looked inside the CoreData framework which i added to my project, and NSFetchedResultsController is NOT present. i tried deleting and reinstalliing Xcode (version 7.3.1), on the assumption that the swift support was out of date, but no joy. i've found numerous articles about the "Use of undeclared type" error ... caused by reference to an instance or a custom framework declared incorrectly. numerous other articles describing in detail how to use a NSFetchedResultsController in swift code. no help anywhere have looked, nothing about an apple framework missing a well documented class
anybody have a solution?
my code:
import CoreData
import AppKit
class MyViewController: NSViewController, NSTableViewDataSource {
@IBOutlet weak var tableView: NSTableView?
let fetchedResultsController: NSFetchedResultsController = {
var request: NSFetchRequest = NSFetchRequest(entityName: "ZIdea")
let f: NSFetchedResultsController = NSFetchedResultsController(fetchRequest: request, managedObjectContext: managedObjectContext, sectionNameKeyPath: nil, cacheName: nil);
f.delegate = self
return f
}()
}