检查静态库的iOS部署目标 [英] Check iOS deployment target of a static library
问题描述
我有很多静态库,比如 libBlah.a
使用 file
工具我可以检查支持的架构。 (arm64或i386)
I have many static libs like libBlah.a
With file
tool I can check supported architectures. (arm64 or i386)
是否有工具检查静态库的 iOS部署目标
?
Is there tool to check iOS Deployment Target
of the static lib?
推荐答案
您可以使用 otool
来检查库文件。通过一些实验,我发现标志 -lv
给了我有用的输出。打开一个终端窗口并切换到你的库所在的目录:
You can use otool
to inspect the library file. With some experimentation I found that the flags -lv
gave me useful output. Open up a terminal window and switch to the directory your library is in:
cd /path/to/parent/directory
(提示:您可以将图标从取景器窗口的标题栏拖到终端中,它将进入你的道路)。然后键入以下命令:
(Hint: you can drag the icon from the title bar of a finder window into the terminal and it will enter the path for you). Then type the following command:
otool -lv myStaticLibrary.a | less
在 less
中,输入 / (搜索)然后 LC_VERSION_MIN_IPHONEOS
。你应该看到这样的东西:
In less
, type / (search) and then LC_VERSION_MIN_IPHONEOS
. You should see something like this:
Load command 1
cmd LC_VERSION_MIN_IPHONEOS
cmdsize 16
version 7.0
sdk n/a
部署目标应该是<$旁边的值C $ C>版本。
这篇关于检查静态库的iOS部署目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!