Tema Tema - 1 year ago 112
iOS Question

Check iOS deployment target of a static library

I have many static libs like


tool I can check supported architectures. (arm64 or i386)

Is there tool to check
iOS Deployment Target
of the static lib?

enter image description here

Answer Source

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

In less, type / (search) and then LC_VERSION_MIN_IPHONEOS. You should see something like this:

Load command 1
  cmdsize 16
  version 7.0
      sdk n/a

The deployment target should be the value next to version.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download