Let's say there is a dylib whose source code is available in a repository of https://github.com/apple-oss-distributions.
I can see a version/tag for this release in github.
Now I want to find which versions of macOS include this version of the dylib.
This requires to be able to tell which version of the lib is distributed with a specific macOS version. And this is already being a problem.
- If I create a small executable that is linked to this library and I use otool -L to see the version of the dylib, I get 1.0.0. Which definitely does not match a version/tag from github.
- If I use dlopen and the mach-o/dylib.h APIs to find the version listed in the appropriate segment/section, I also get 1.0.0.
The next step I'm looking at is to spend some time to successfully build the dyld_shared_cache_util to extract the dylib from the cache and hope there will be more info.
But, maybe, there is a document on Apple's website or a feature in the github repository that I missed.
So the question is: is there a simple way to get this info?