Andrea Smith told me about this one. It is the only one I’ve ever tried that actually works.
Put some fruit in a tall glass.
Cover the glass top with cling wrap. Make it tight on the sides.
Prick a few needle holes in the top. I used a fairly large needle.
The little stinkers can get in but can’t get out.