Wash the blackberries, remove stems and hard berries and put them into a preserving pan. Peel, core and chop the apples and chop the onions. Add to the blackberries with the sugar, vinegar and spices. Simmer for 1¼ hours until thick, stirring well. Put into hot jars, cover and seal.