Hi all, I've just been hunting about for this myself and I think I've found the origins of the phrase on urbandictionary.com, so I just thought I'd post it here.
It seems to come from World War 1, when "Stokes guns" fired round shells with sticks that were nicknamed Toffee Apples. In the 1959 film "Rio Bravo", guy throws a grenade, followed by the taunt "how do ya like them apples?".
Maybe it was something that WW1 soldiers shouted when they hit a target with a Stokes gun??
Source:
http://www.urbandictionary.com/defin...rm=them+apples
Hope this helps :)