Your camera already writes down which lens took every photo. I built an app that reads it.
AperFolio shows the photos behind each camera and lens you own, the focal lengths you live at, and what's been sitting in the bag. iPhone, no account, nothing uploaded.