Run 32 bit library on iPhone 5s 64 bit

不羁的心 提交于 2020-01-20 08:07:08

问题


I'am using zbar in my application. If I want to run it on my iPhone 5s with an 64 bit processor, I get the following errors:

Is it possible to use the 32 bit library on a 64 bit device, because I don't think, the library is going to be updated.


回答1:


To summarize the comments above. A 64bit iPhone application requires all constituent libraries and frameworks to be 64bit. You can't mix and match. Leaving an application 32bit is non-optimal long term since iOS has to keep two versions of the system libraries loaded (32 and 64) as soon as a single 32bit app is run. Hence, you don't want to be the last app to support 64bit!

You can check if your library contains 64bit code using lipo. For example, here's the SBJson framework in 32bit:

$ lipo -info SBJson.framework/SBJson 
Architectures in the fat file: SBJson.framework/SBJson are: armv6 armv7 i386 

and with 64bit code

$ lipo -info SBJson.framework/SBJson
Architectures in the fat file: SBJson.framework/SBJson are: armv7 armv7s i386 x86_64 arm64 

In the case of zbar, if it's not available you could always try compiling yourself from source.



来源:https://stackoverflow.com/questions/18983975/run-32-bit-library-on-iphone-5s-64-bit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!