问题
I am facing the following scenario:
- 32 bit device + app armv7 + dynamic library armv7 arm64 = work
- 64 bit device + app armv7 + dynamic library armv7 arm64 = doesn't work
doesn't work - app crashes on load with the following error:
dyld error message library not loaded reason no suitable image found
Any explanations?
回答1:
Explanation: 32 bit binaries loaded on 64 bit devices fail to do so since the 32 bit pagesize has been changed from 4096 bytes to 16384 bytes in iOS 9.
Conclusion: 32-bit apps with dynamic libraries cannot run on 64-bit devices.
Solutions (one of the two is enough):
Add a new entry to Other linker flags in the dynamic library project:
-Wl,-segalign,4000
- Update app itself to support arm64 architecture
来源:https://stackoverflow.com/questions/34707643/32-bit-app-with-dynamic-library-crash-on-64-bit-device