In a pan, put 200g chopped onions, 200g peeled and chopped eating apples and 400g peeled and chopped cooking apples with 25g finely chopped ginger, 200g sugar and 125ml red wine vinegar. Simmer for 50 mins until thick and tender, then stir in 200g cranberries and simmer for 10 mins more. Cool.