Trying to create a (Swift 3) generics based function that allows for any NSManagedObject to use.
function (from NSManagedObject+MagicalAggregation.h)
open class func mraggregateOperation( function: String, onAttribute attributeName: String, with predicate: NSPredicate?) -> Any?
here is my function:
It compile, builds and runs, but at the end of the invocation, at the return statement, I get this:
EXCBADACCESS (code=1 ...)
From what I understand, bad access is from a variable going out of scope and being garbage collected. I turned on zombies and still get this, without any additional information per the reason.