Chop tomatoes and apples roughly, including the skin and cores. Peel and chop onions. Place ingredients together in a pan, cover and simmer until soft.
When softened add the vinegar, sugar and spices and simmer, covered for a further 30 minutes. Sieve and return to pan.
Simmer without lid for 15 minutes to thicken. Pour into hot, sterilized jars and place in a simmering water bath for 30 minutes. Seal and label.