Heat the oil in a saucepan, add the onions and fry for 5 minutes until softened. Add the apples and tomatoes, then stir in the remaining ingredients.
Cook over and gentle heat, uncovered, for 1 hour, stirring more frequently towards the end of cooking as the relish thickens.
Ladle into warm, dry jars, pressing down well and filling the jars to the top. Disperse any air pockets with a skewer or small knife and cover with screw-top lids. Label and leave to mature in a cool, dark place for at least 3 weeks.
To serve, this relish is perfect for dipping chunky chips.