Suggested ways for checking fruit for SWD infestation, include looking for egg breathing tubes, finding leaking pinholes, and floating out the larvae.
Egg breathing tubes You'll need a good pair of eyes and 20x magnification. Fruit on which this technique works fairly well include blackberry, cherry, black raspberry, dark plum and grape varieties, and probably nectarines. Looking for breathing tubes on fruit that is fuzzy (peach, red raspberry), has a waxy bloom (plums, grapes), or is light yellow in color may not be worth the effort. Blogs with breathing tube pictures: SWD in plums, Monroe County - first report, and Oviposition in blackberry. A word of caution – I've noticed that once the egg has hatched (12 to 72 hours after laying) the breathing tubes may be shed from the fruit and, therefore, won't be visible. After hatch, what remains on plum, blueberry and other relatively thick-skinned fruit is a pinhole through which the larva periodically breathes as it pauses from feeding. The soft skin and drupelets of blackberry and raspberry collapse in response to larval feeding and the pinhole is less apparent.
Leaking pinholes On tougher skinned fruit (plum, blueberry, cherry, grape) gently squeezing the near-ripe to ripe fruit may cause a dewdrop of juice to leak through the pinholes that are associated with oviposition and larval development. Fruit that appears sound but from which leaking juices are noticed can be a sign that SWD may be developing in the fruit. Dried drops of juice seen on leaves below a fruit cluster or on fruit in the field are also signs of possible SWD infestation, especially if no bird damage, cracking or other obvious signs of damage are seen on the fruit.
Floating out the larvae The salt floatation method can be used to quickly assess larval infestation in fruit. This method works better with the soft-skinned fruit, such as blackberry and raspberry. It can be used on blueberry, though the skins may trap the larvae and possibly affect the test results. On larger fruit, such as cherry, peach, and plum, this technique may not work very well. Dissolve 1 Tbsp (~15 cc) table salt in 1 cup (~250 ml) water. Place about 100 fruit in a Ziploc bag or a crisper-type container and add the salt solution. Gently crushing the fruit may help release the larvae. After one hour, examine the salt-solution-immersed fruit for the presence of larvae (white, ~2-4 mm long). The fruit sample may be split into two parts. One part used immediately in a salt floatation test. The other part kept for 3 days to allow eggs to hatch and larvae to develop prior to doing the salt floatation test. (Keep the fruit covered during the 3-day incubation, so it is not contaminated by ambient vinegar flies, and keep it on paper towels or a sponge to absorb liquid, so the larvae don't drown.)