0

I want to package my code in a static library. Do i need to make separate static libraries for simulator and iOS device?

Qasim Hasnain
  • 198
  • 1
  • 1
  • 9

2 Answers2

3

Yes, you need to make for both of them separately. You can also combine it with lipo command after making it separately.

lipo -create libSignatureLibary_simulator.a libSignatureLibary_device.a  -output libSignatureLibary_universal.a
codester
  • 36,891
  • 10
  • 74
  • 72
2

You can create a "fat" static library that works with the simulator and devices various ARM. It's bit messy to set up, search for "iOS universal static library". Two articles on how to do that are here and here.

It boils down to creating the static library each for simulator and devices, then combining them using the lipo tool.

DarkDust
  • 90,870
  • 19
  • 190
  • 224