Hi deeje,
Thanks for your reply.
In principle I'd agree - however as I mentioned, a normal NSFetchRequest works
So from this ViewController in the share extension, the NSFetchRequest returns the same core data results.
override func viewDidLoad() {
super.viewDidLoad()
let fetchRequest = NSFetchRequest<Person>(entityName: "Person")
fetchRequest.sortDescriptors = [NSSortDescriptor(key: "date", ascending: false)]
do {
/// this works!
let persons = try CoreDataManager.shared.managedObjectContext.fetch(fetchRequest)
print("Got \(persons.count) Persons")
} catch {
print("Fetch failed")
}
activateResultsController()
}
Its just NSFetchedResultsController with the same NSFetchRequest not returning results.
It doesn't make sense to me why a vanilla NSFetchRequest would work however a NSFetchRequest inside NSFetchedResultsController would no work?
Thx