Prep the apples, onion, and ginger. I like using my small-dice food chopper here because it makes the whole process go quickly.
In a heavy-bottomed pot over medium heat, combine the apples, onion (if using), ginger, brown sugar, vinegar, water, and salt. Stir well.
Bring the mixture to a gentle simmer, then reduce the heat to low. Cook uncovered or partially covered, stirring occasionally.
After about 25–35 minutes, the apples will soften and the liquid will reduce.
If you like a chunkier chutney, stop when the fruit is tender but still holds some shape. For a smoother texture, cook a bit longer or mash some of the pieces with a spoon.
Add the cinnamon, cloves or allspice, and optional dried fruit during the last 5–10 minutes of cooking.
When the chutney has thickened to your liking, let it cool slightly. Transfer to sterilized jars and refrigerate. The flavor deepens beautifully after a day or two.