Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
773 views
in Technique[技术] by (71.8m points)

ios - 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...