Combine the apples, onion, ginger, orange juice, vinegar, brown sugar, mustard seeds, red 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 cook, stirring occasionally, until most of the liquid has evaporated, 45 minutes to 1 hour. Remove from the heat and stir in the raisins.