NSPredicate crash after swift 3 migration
问题 after migration to swift3, I have an issue that cannot fix let fetchRequest: NSFetchRequest<User> = User.fetchRequest() fetchRequest.predicate = NSPredicate(format: "id == %@", id) my App crashes on second line, bad access, no reason. types are right, no log, nothing, just bad access. any suggestions? Found a reason, predicate is wrong, cause id is Int64 type, have no idea what kind of predicate I need for this version of swift 回答1: The %@ format expect a Foundation object as argument,