简体   繁体   中英

How to avoid build and lipo of Universal Framework everytime project is built?

I have a project that uses a custom framework I've built. This framework provides a clean API based on Objective-c which hides c++ code.

The framework has a universal builder target that uses a Run Script to run xcodebuild and then lipo the binaries for the framework to include.

I realize that the project always wastes a lot of time calling the universal builder target which builds and lipos the binaries. My question is how can I avoid xcodebuild and re-lipo if the source files if they haven't changed?

在此处输入图像描述

Well, after much research and getting down and dirty I realized two things.

  1. I did not need a universal build script target. The reason being that the framework project was included on the app I was working with. So xCode automatically is building the correct architecture for the framework. This speeds up the build process since now framework building will only happen when something changes.

  2. So if you are still in need of using a universal build script use the Input Files and Output Files to define your script variables. This then allows xCode to check if the files need to be built and thus executing the script. More on that here: https://patrickbalestra.com/blog/2018/08/27/improving-your-build-time-in-xcode-10.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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