Unfortunately the new Core Data semantics make me crazy. My previous question had a clean code that didn\'t work because of incorrect auto generation of header files. Now I
Delete Core Data Object with query in Swift 5, 4.2
let fetchrequest = NSFetchRequest(entityName: "Your_Entity_Name") fetchrequest.predicate = NSPredicate(format: "any your_key == %d", your_value)
hope this will help to someone