Xcode 6.3 builds all swift files twice

I just upgraded to Xcode 6.3, and am attempting to reduce the compile time to something manageable. I have ~120 swift files/classes in my project and it's taking 2-3 minutes to compile. My project also has two test targets: UnitTests and AutomatedTests .

Here's a snapshot of what's going on when I build: 在这里输入图像描述

Under each of those "Compile Swift source files" it compiled every single Swift file. I watched it as it happened.

Why would it be compiling everything twice, and how do I stop it?

- Edit -

@matt points out that it's building once for each architecture. I'm assuming this isn't necessary for development (running in simulator). Any suggestions on how to only build appropriate architectures for the target device?


Change the Build Active Architecture Only setting for Debug and any other non-Release configuration from No to Yes . You want it to be Yes when you build for distribution, but otherwise having it set to No means your files won't be compiled twice.

链接地址: http://www.djcxy.com/p/25614.html

上一篇: 工厂模式:创建bean时验证输入(Guice / Guava)

下一篇: Xcode 6.3构建两次所有的swift文件