如何从静态库中获取版本号? [英] How do I get version number from a static library?

查看:71
本文介绍了如何从静态库中获取版本号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用于链接到 iOS 应用程序的库的 .a 文件.我如何知道库的版本号?我不需要以编程方式执行此操作,我只需要手动获取一次即可.

I have a .a file for a library I'm linking to an iOS application. How do I know the version number of the library? I don't need to do this programmatically, I just need to get it manually once.

推荐答案

关于如何将版本号编码到静态库中没有共同的主题.

There is no common theme on how to encode a version number into a static library.

有时根本不存在.有时这是使用属于该库的标头完成的.有时它是使用返回此类信息的函数完成的.在某些情况下,静态库是伪框架的一部分,该框架包含一个可能包含正确版本号的 plist.

Sometimes there is none present at all. Sometimes that is done using a header that belongs to that library. Sometimes it is done using a function that returns such information. In some cases that static library is part of a pseudo framework which contains a plist that might contain a correct version number.

请记住,静态库本身只不过是放入文件存档中的一堆目标文件.几乎没有任何附加信息,更不用说元数据了.

Remember, a static library by itself is not much more than a bunch of object files put into a file archive. There is hardly any additional information, not to speak of metadata.

这篇关于如何从静态库中获取版本号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆