Put the apples in a large cast-iron pot or heavy-based saucepan. Add the onion, garlic, dates, water, apple juice, white-wine vinegar, malt vinegar, tomato paste, tamarind purée and treacle. Place over medium heat and bring to the boil. Reduce the heat to low and simmer the sauce for 45 minutes, stirring regularly. Remove from the heat and leave to cool for 30 minutes.</