简体   繁体   English

通用静态库iOS

[英]Universal Static Library iOS

I've created 2 static libraries for my SDK. 我为我的SDK创建了2个静态库。 One which is for device (armv7, arm64) and one universal, which is for device and simulator (i386 + x86). 一种用于设备(​​armv7,arm64),另一种用于设备和模拟器(i386 + x86)。
- I want to use only one instead of two, but the sizes are 1.5mb and 2.9mb respectively. -我只想使用一个而不是两个,但是大小分别为1.5mb和2.9mb。
Does Apple use only the active architectures of the SDK, thereby using only 1.5mb even if I give the 2.9mb SDK? Apple是否仅使用SDK的活动体系结构,即使我提供2.9mb的SDK也仅使用1.5mb的东西?

It should only pull the object files out of the static library needed to build the executable. 它仅应将目标文件从构建可执行文件所需的静态库中拉出。 So, my guess would be the file size would remain unchanged. 因此,我猜测文件大小将保持不变。

You can test this. 您可以对此进行测试。 Build two .ipa files. 生成两个.ipa文件。 One linked with the device lib and one linked to the universal lib. 一种与设备库链接,另一种与通用库链接。 Compare the sizes of the two .ipa files. 比较两个.ipa文件的大小。

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

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