Peel and core the apples and chop. Peel and chop the onions. Skin and chop the tomatoes. Tie the pickling spice in a muslin bag. Put all the ingredients into a pan and simmer for 2¼—2½ hours or until thick. Remove the pickling spice, pour into hot sterilized jars and seal.