In a medium saucepan, bring sugar, water, cinnamon, and salt to a boil over medium heat. Stir occasionally until sugar is dissolved. Stir in cranberries and apples. Simmer until slightly thickened and the berries begin to pop, about 10 minutes. Remove from heat and cool to room temperature, about 1 hour.