Time flies like an arrow... Fruit flies like a banana
Fruit flies are not fussy. In fact you will probably find them living on all sorts of things - old fruit, cereals, bread etc. When organic matter ferments, they are never far away. However, when we culture flies we need to be provide food for both adults and larvae, and it has to be a food, or media, that is long lasting, and of a suitable consistency to remain in place when the fly containers are inverted. The adults eat yeasts at the surface, whilst the larvae bury down into the media.
I use the Sussex mix, but have included two commonly used, and much simpler recipes. The Sussex mix is a bit of a chore to make up, but it's use solves all of the problems of 'quick' recipes, and is by far the best choice if large numbers of flies are needed.
I strongly recommend the Sussex mix. It is long lasting, solid enough to stay in its vial when tapped upside down, and meets all the nutritional needs of the larvae. It also remains moist for a week or more, and it's life can be prolonged with a drop of water or two.
Other media can feed the flies adequately, but are often insufficiently solid when the vials are inverted to collect flies. They are very often too wet (banana) or too dry (mash potato}. This is much less of a problem for those that keep amphibians, who can place the culture within the animals enclosure. But for fish keepers, the flies must be collected. The Sussex media sets as a semi-rigid gel, which makes handling the flies incredibly easy.
If your chosen media is too wet, adding wood shavings can keep the media in place (to some extent) and provide dry walkways for the emerged flies to climb up onto. This is never required with the Sussex media, but always required with a banana based media.
Whatever recipe you follow, it will feed the larvae, but not the parent flies; all food should be sprinkled with brewers yeast (not the bakers yeast used in the recipes above) immediately before adding the adult flies. Not only does this provide a source of food for the flies, but also ensures the surface is dry, and the delicate flies will not get stuck down in sticky media.