I have a project I'm trying to convert to Swift 3.0, which includes the following code:
if let array = games?.array as? [SMCGame] {
let wonPredicate = NSPredicate(format: "actualTime <= %@ && (homeScore > opponentScore)", [date])
let wonArray = (array as NSArray).filtered(using: wonPredicate)
}
This works fine in Swift 2.2 and 2.3, but in 3.0 I get the following runtime error on the last line: -[_TtCs21_SwiftDeferredNSArray timeIntervalSinceReferenceDate]: unrecognized selector sent to instance 0x7f96614520d0
How can I get this working in Swift 3.0?