Simply setup cache for Unity generated Xcode project to speed up build times.
- Clone repository into Unity
Editor
folder. - Execute
Tools/Xcode/WriteCache
before build Xcode project. - Build Xcode project.
- Execute
Tools/Xcode/ReadCache
after build Xcode project. - Open Xcode and build, build will use previous build cache to speed up
The principle is simple:
- Copy whole Xcode project to
Cache
folder and preserve all timestamps. Cause Xcode use file and directory timestamp to decide whether to use cache. - Use Unity to generate Xcode project
- Depth-first traverse Xcode project and compare file with cached, set timestamp to cached if they are equal.
- Unity 2017.4.2f2
- Xcode 9.4.1
- macOS 10.13.6
It didn't use any special trick, so it should compatible with all Unity, macOS and Xcode versions.