Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run 32 bit library on iPhone 5s 64 bit

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:

Trying to run on my iPhone 5s

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.

like image 510
jussi Avatar asked Sep 24 '13 14:09

jussi


1 Answers

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.

like image 192
Dan Bennett Avatar answered Sep 26 '22 05:09

Dan Bennett