You can put a slice of banana in the enclosure to atract fruit flies. Make sure the enclosure is not in direct sunlight. Also the cage should not be glass and the mess on it should ve small enough to prevent escape, while at the same time allowing fruit flies in.