Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check iOS deployment target of a static library

Tags:

ios

testing

I have many static libs like libBlah.a With file 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

like image 744
Tema Avatar asked May 26 '15 18:05

Tema


People also ask

How do I check my iOS deployment target?

Click the Books target and select the General tab at the top. The General tab contains a section with name Deployment Info. The section contains a dropdown menu and three checkboxes, iPhone, iPad, and Mac.

How do I change the deployment target in iOS?

Click on pods. Select each project and target and click on build settings. Under Deployment section change the iOS Deployment Target version to anything more than 8.0 (better to try the same project version). Repeat this for every other project in your pods then run the app.

Is XCFramework static or dynamic?

An XCFramework can be either static or dynamic and can include headers.

What is a deployment target?

In the Deployment Targets app, you assign deployment targets to your projects. A deployment target represents a dedicated system tenant of the assigned solution.


1 Answers

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
      cmd LC_VERSION_MIN_IPHONEOS
  cmdsize 16
  version 7.0
      sdk n/a

The deployment target should be the value next to version.

like image 107
Frank Schmitt Avatar answered Nov 23 '22 18:11

Frank Schmitt