Remove the seeds from the chilli pepper and dice finely. Peel and finely grate the ginger. Quarter, core and finely dice the apples. Coarsely chop the cranberries. Boil everything with the preserving sugar and the star anise over a medium heat and boil fast for about 4 minutes.
Wash the sweet potatoes and cut into wedges. Peel and halve the garlic. Mix both with 3 tbsp oil, spread on a grill tray and cover with thyme.