Static library gives error on iOS simulator and works on iOS device

耗尽温柔 提交于 2019-12-03 14:22:52
Toastor

You have propably built your library for the device architecture only. The iOS Simulator is not an emulator, meaning the code needs to be able to run on your Mac's architecture, which is obviously different from your device's architecture.

As a library is precompiled (for a specific architecture), the code it consists of doesn't get compiled again for your current target once you use it in your project. This is why you need to build your library for both architectures in the first place.

This SO Answer explains how to bundle two library builds into one handy "fat file".

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