Build fat static library (device + simulator) using Xcode and SDK 4+

前端 未结 10 1235
独厮守ぢ
独厮守ぢ 2020-11-22 02:21

It appears that we can - theoretically - build a single static library that includes both simulator and iPhone and iPad.

However, Apple has no documentation on this

10条回答
  •  日久生厌
    2020-11-22 02:53

    Great job! I hacked together something similar, but had to run it separately. Having it just be part of the build process makes it so much simpler.

    One item of note. I noticed that it doesn't copy over any of the include files that you mark as public. I've adapted what I had in my script to yours and it works fairly well. Paste the following to the end of your script.

    if [ -d "${CURRENTCONFIG_DEVICE_DIR}/usr/local/include" ]
    then
      mkdir -p "${CURRENTCONFIG_UNIVERSAL_DIR}/usr/local/include"
      cp "${CURRENTCONFIG_DEVICE_DIR}"/usr/local/include/* "${CURRENTCONFIG_UNIVERSAL_DIR}/usr/local/include"
    fi
    

提交回复
热议问题