I've been bothered by gnats, not fruit flies... I've always used a couple thimbles full of red wine to lure the gnats.
I haven't had fruit flies in AZ. Though I could tell you tales or horror re the 1980s Mediterranean Fruit Fly in California and Gov. Moonbeam.
Cider Vinegar is MUCH cheaper. I drink both for medicinal reasons.