Xcode Warning: Ignoring the libxml2.2.dylib file created for an unsupported file format that is not architecture related

I was tasked with adding several features to the iOS app. I checked the source on SVN so that it met more than 100 warnings (argh), fortunately, I got to the last one, namely:

Xcode warning

(locked bits is the name of the client ...).

I believe this warning says something like: "This XML library is not compatible with the OS architecture that is associated with the assembly."

In the next release, we only support iOS5 and iPhone 4 and above (and not lower versions of iOS and older iPhones).

How to change link architecture? What is link architecture? How to change the architecture? Or am I completely mistaken?

Perhaps it’s worth mentioning that I am running the last Xcode, I added a framework from the Xcode list (binary link code with libraries).

EDIT

I get a message only when creating from a simulator. It does no harm, it just puts me in the wind!

Thanks in advance.

+4
source share
4 answers

Do not link to libxml2.2.dylib, not libxml2.dylib. Linking this should ensure that you are always connected with the correct implementation of your architecture.

As a rule, in your applications a link to the general version of the library, and not to a specific version. In this case, it means libxml2, not libxml2.2.

You are contacting a dynamic library (symbolic link to), which at runtime will automatically indicate the correct implementation for the current version of the OS and architecture. Linking to a specific version of the library does not guarantee this, and you can end up linking to something that has only one architecture. Thus, during development, if you reference libxml2.2.dylib, when you target the simulator, you can refer to something that is i386, then when you target the device, it cannot find the correct architecture (because he is trying to use i386 for armvWhatever, and that is exactly what you are saying).

+3
source

If you are trying to use libxml2.2 , it is already available in Xcode. Instead of getting it from an external source (in any case, Apple will not allow you to use a dynamic library), add it to Xcode in your frameworks, and then connect it by adding /usr/lib/libxml2/ to Header Search Paths . Do not link your project with dylib that was not provided by Apple, or your application will be rejected. In addition, the i386 architecture is not an iOS architecture, since iOS uses the armv7 and armv7s for newer versions of its devices, so you get an architecture warning.

+1
source

Basically, the difference between libxml2.2 and libxml2 is that libxml2.2 points to a specific libxml version / implementation, whereas libxml2 is a shortcut / symbolic link that points to the latest version and the correct libxml2 architecture that Xcode can find. Therefore, when adding such a structure, you should always add the “general version” (symbolic link) (libxml2), and not the “specific version” (libxml2.2) because of the exact problem you are seeing.

Hope this helps!

0
source

This suggests that you are attached to something built, and not to the hand. You will need another dylib to link or go to project settings and change the arch. (if you are building dylib) Probably enable arm7 or the like.

-1
source

All Articles