Put the onion, garlic, chile pepper, ginger, mustard seeds, and vinegar into a large pan, bring to a boil, then reduce the heat and simmer for 15 minutes. Stir in the sugar and cook for another 15 minutes.
Meanwhile, use a knife to slice a cross on the bottom of each fruit and put into a large bowl. Cover with freshly boiled water and leave for about 2 minutes, then drain, rinse with cold water, and remove their skins.
Cut the fruit into segments and add half to the pan. Simmer for 40 minutes, stirring occasionally, then add the remaining pieces of fruit and cook for a final 10 minutes. Stir in the lime juice, pour the rest into warm sterilized jars and seal.