In early use, apple was a general term for all kinds of fruits other than berries, including even nuts. In fact, apple and berry are the only Anglo-Saxon fruit names, the rest being of Latin or ‘exotic’ origin.
This is why apple was commonly used in describing foreign fruits, which explains for example the word pineapple, from the resemblance of the fruit to a pine cone.
(In French, pomme, meaning apple, was used in the same way, hence English pomegranate, from Old French pome grenate, literally apple (i.e. fruit) having many seeds.)
The pupil of the eye used to be called apple because it was thought to be a solid, spherical body. The first recorded use of the word in this sense is in the West-Saxon version of Liber Regulæ Pastoralis (The Book of the Pastoral Rule), a treatise in Latin on the responsibilities of the clergy written in the 590s by Pope Gregory I (circa 540-604); the West-Saxon version, attributed to King Alfred (849-99), was written in the 890s:
(1871 edition by Henry Sweet)
Hwæt on ðæs siweniggean eagum beoð ða æplas hale, ac ða bræwas greatiað, forðæm hie bioð oft drygge for ðæm tearum þe ðær gelome offlowað, oððæt sio scearpnes bið gewierd ðæs æples.
The pupils of the bleared eyes are sound, but the eyelashes become bushy, being often dried because of the frequent flow of tears, until the sharpness of the pupil is dulled.
In another text of the same period also attributed to King Alfred, the Anglo-Saxon version of De Consolatione Philosophiæ (The Consolation of Philosophy – 523) by the Roman philosopher Boethius (circa 480-524), the apple of one’s eye was already used as the type of something precious. The translation of the Anglo-Saxon text is:
A certain wise man said that the divine power saved his darlings under the shadow of his wings, and protected them as carefully as man does the apple of his eye.
The Anglo-Saxon and the original Latin texts were themselves referring to the Book of Psalms, 17:8, which is, in the Early Version (around 1382) of the Wycliffe Bible:
Kep me, as the appil of the eȝe. Vnder the shadewe of thi weengis [= the shadow of thy wings] defend me.
However, the Vulgate, the Latin version of the Bible, uses pupilla oculi, literally the pupil of the eye.
The meaning of apple of the eye was sometimes extended to the iris and pupil, or to the whole eyeball. For example, in A Dictionarie of the French and English Tongues (1611), Randle Cotgrave translated the French noun prunelle as:
A sloe […]; also, the ball, or apple of the eye.
French prunelle, a diminutive of prune, means sloe. It has long been used figuratively in the same senses as English apple (of the eye). For example, in Le Treytys (The Treatise), the English knight and poet Walter de Biblesworth (1235-70) glossed Anglo-Norman “la prunele” as “the appel of the eye”.
And both the meanings pupil of the eye and something cherished were recorded in the first edition (1694) of the Dictionnaire de l’Académie française:
– Sorte de petite prune sauvage [= Sort of small wild plum] […]
– Le noir de l’œil [= The black of the eye] […]
– Conserver une chose comme la prunelle de l’œil, pour dire, La conserver soigneusement, précieusement [= To keep something like the apple of the eye, to say, To keep it carefully, preciously].
The Book of Psalms, 17:8 is, in the Segond 21 French version (2007):
Garde-moi comme la prunelle de l’œil, protège-moi à l’ombre de tes ailes.
But the Modern French expression uses the plural yeux instead of the singular œil. Tenir à quelque chose (or quelqu’un) comme à la prunelle de ses yeux means to cherish, treasure something (or someone).