Sterilise the jars by putting them into the dishwasher on the hottest cycle to wash and dry. Take them out when you are about ready to use them and don’t touch any of the inside of the jars with your hands. (Alternatively, put the jars in a very large pan of boiling water. You will also need to sterilise the equipment you use to take the jars out of the pan.)
Place the jars into the oven set at a low temperature until completely dry inside.
Put the apples, onions, sugar, balsamic vinegar, cinnamon and freshly ground black pepper into a large saucepan. Place over a medium heat and gently stir together until well combined.
Once the mixture has reached boiling point, turn down the heat and leave to simmer for 45–55 minutes, stirring occasionally. The apples and onions should become lovely and soft, and the liquid should be thick and syrupy.
Add the blackberries and cook for a further 10–12 minutes.
Spoon the chutney into a sterilised jug and fill the jars. Seal and store in a dark place. The chutney will keep for up to four months.