In a medium pot, bring the water to a rolling boil over high heat. Add the star anise, cinnamon, piloncillo, and salt and stir to dissolve the salt and piloncillo. Add the raisins, apples, sugar cane, guavas, and tejocote. Boil for 5–6 minutes, then remove the pot from the heat.
Cover the pot and steep for about 30 minutes, until the flavors have melded.
Return the mixture to a boil. Add the apple juice and stir to combine. Adjust the sweetness and apple flavor by adding more apple juice or piloncillo, if needed.