Combine the apples, lemon juice and zest in a large saucepan. Cover with 1 litre of water, bring to the boil over a medium heat, then reduce the heat and simmer for 1 hour. Transfer the mixture to a muslin-lined fine sieve and strain into a bowl, discarding the pulp. This should yield about 2 cups of liquid.
Combine the liquid and sugar in a large saucepan and bring to the boil, stirring to dissolve the sugar and cook for 15-20 minutes. Test whether the jelly is set. If not, return to the heat and test after 5 minutes.
Remove from the heat, stand for 10 minutes, then skim the film from the surface. Add the rosemary and ladle into clean, dry jars. Seal the lids, invert jars for 2 minutes, then turn upright and cool completely. Store in the refrigerator for up to 3 weeks.