简体   繁体   English

为设备和模拟器创建32位和64位静态库-Xcode

[英]Create 32-bit and 64-bit Static Library for Devices and Simulators - Xcode

I've got this SDK that supports 64-bit. 我有这个支持64位的SDK。 For whatever reason, the library does not build on iOS simulators. 无论出于何种原因,该库都无法在iOS模拟器上构建。 To circumvent this I've created my own static library that instantiates the headers and implements everything. 为了避免这种情况,我创建了自己的静态库,该库实例化了标头并实现了所有内容。 This method has always worked and allowed me to build and run the project on a simulator and devices (The standard library is used for devices and my static library is used for simulators). 这种方法一直有效,并允许我在模拟器和设备上构建和运行项目(标准库用于设备,而静态库用于模拟器)。

Now that we have 64-bit and 32-bit devices and simulators, my static library does not build for 32-bit simulators. 现在我们有了64位和32位设备和模拟器,我的静态库不再为32位模拟器构建。 However, it does build for all devices (32-bit and 64-bit) and 64-bit simulators. 但是,它确实为所有设备(32位和64位)和64位模拟器构建。

Does anyone know how to create a static library that works for both 32-bit and 64-bit devices and simulators? 有谁知道如何创建适用于32位和64位设备和模拟器的静态库?

you need to create fat library which is a combination of libraries for different architecture. 您需要创建胖库,该库是针对不同架构的库的组合。 have alook at this gist Create fat library 看看这个要点创建脂肪库

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM