I used to develop food sorters. Color sorting is very simple in principle and much harder in practice. The main difficulties are good lighting, not shaking your cameras and optics to pieces and keeping the optics and lights clean.
For fruit sorting in particular there is the very difficult task of conveying the fruit without damaging it. The best sorter in the world won't help you if it mangles the fruit.
In my old lab, there are solutions to most of the common food sorting problems, not all of those solutions make it out to the field though.