Problems with spots in the flesh of cooking apples from my tree. They are brown and the fruit is peppered, but the outside skins look perfect?
The shortage of these nutrients cause a breakdown of the cell walls and pitting results. The apples can be used but do not usually keep as well.
Apply a foliar spray of Miracle Grow, or some such complete plant food, a couple of times in early summer and mid-summer. You could also mulch to retain moisture and water in a prolonged dry spell.