Combine the apples, onion, ginger, orange juice, vinegar, brown sugar, mustard seeds, pepper flakes and salt and in a large saucepan. Bring the mixture to a boil over medium-high heat, stirring occasionally. Reduce the heat to simmer and continue cooking, stirring occasionally, for 50 minutes to 1 hour, until most of the liquid has evaporated. Take off the heat and add the raisins.
Set aside to cool and store covered in the refrigerator for up to 2 weeks.