After the Xcode 9.3 update, I\'ve noticed that if you want to have Predicate like this:
let predicate = NSPredicate(format: \"preferred = %@\", true as CVarArg)
// Solution 3 [ Apple Documentation ]
let predicate = NSPredicate(format: "preferred == TRUE")
The exception occurs because true is not an object (%@). You need the %d placeholder
true
%@
%d
let predicate = NSPredicate(format: "preferred = %d", true)