Little maggots on top of my home-made apple cider vinegar, is it bad? This was my first attempt at making apple-cider-vinegar at home. I did this all following a tutorial from YouTube. I simply cut a few apples and put them in a clean jar with sugar+water. I set the lid over the jar but did not tighten so as to allow some airflow. Then, I just kept it untouched for about two weeks. 

Up until two days ago, there used to be messy white foam/scum on the surface. And the jar looked a little messy on the top due to that. Today I noticed it is all clean at the top, then when I looked closely I found these tiny maggots lurking all around the top of the jar.

 





Is this batch completely ruined? What must have I done wrong? Is it salvageable?

Am I right to think that some sort of tiny flies must have found a way inside the jar (since the lid was intentionally not tightened)? Also I don't see these guys below the surface.
I wouldn't even try to salvage this. It's not worth it.  

The two main problems I see are:


You don't have enough liquid. There should be enough water and apple juice that apples can drown in it.
Even with a lid on, there should be a gauze under or over it. Like in the old pictures of a jar with anything sweet. 


Because those maggots probably originated from fruit flies (or regular flies) that were lured with the sweet scent. And you won't see them under the surface as flies don't lay eggs in water. 

The foam/scum would be natural as your mixture started to ferment.