In Australia we have traps, which only trap males.
When you see the males a different set up is used to trap the females, sounds wiered but there is a reason, I will find it again.
Here is the information
1. Monitor for fruit fly activity.
Using fruit fly traps with an attractant (pheromone) in your backyard and checking it daily will let you know whether fruit flies are active in your area and when they have first emerged after winter. Male fruit flies are strongly attracted to these pheromones and this will then alert you when to use other control methods. With experience you will also learn when fruit flies are active in your region.
These traps are long-lasting, but while they do capture some male fruit flies, they will not remove the egg laying females. They need to be used as part of a broader strategy.
And this is the site I drew it from
controlling-fruit-fly/gardeners/choosing-a-control-strategy/