Xcode 8可以进行完整的项目重建 [英] Xcode 8 does full project rebuild

查看:122
本文介绍了Xcode 8可以进行完整的项目重建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已将Swift + ObjC项目更新为Xcode 8(Swift 2.3),我发现Xcode有50%或更多的时间完全重建项目而不是增量构建.

Having updated Swift + ObjC project to Xcode 8 (Swift 2.3) I found 50% or more of the time Xcode does a full rebuild of the project instead of an incremental build.

所做的更改正在添加简单的打印语句.何时执行完全重建似乎没有逻辑.

The changes made are adding simple print statements. There seems to be no logic as to when it performs a full rebuild.

它出现在检查依赖项"阶段,它决定了这一点.在Xcode 7上,这似乎不是问题.

It appears in the "Check dependencies" phase it decides this. On Xcode 7 this did not seem to be a problem.

还有其他人遇到过吗?

推荐答案

我发现这是一致的,但是,如果您修改桥接头文件中包含的头文件,它将编译swift文件.如果来回切换git分支,它也会完全编译.

I have found this works consistently, it will however compile swift files if you modify a header included in the bridging header. It will also do full compile if you switch git branches back and forth.

首先确保将调试的优化级别设置为无"(不是整个模块的优化)

Firstly make sure optimization level for debug is set to None (Not whole module optimization)

然后,根据 https://forums.developer.apple.com/thread/62737 Apple Staff (ddunbar):

Then, according to https://forums.developer.apple.com/thread/62737 Apple Staff (ddunbar):

我们认为设置:

We believe that setting:

HEADERMAP_USES_VFS = YES

对于许多人来说,在您的项目(或所有目标)中将

设置为true可能是一个有效的解决方法.这不能保证能正常工作(这是默认情况下>尚未打开的原因),但是它应该适用于大多数项目.

to true in your project (or for all your targets) may be an effective workaround > for many people. This is not guaranteed to work (which is the reason it isn't > already on by default), but it should work for most projects.

这应该通过目标构建设置"下的添加用户定义的设置"添加.

This should be added through "Add user-defined setting" under your target Build Settings.

.

这篇关于Xcode 8可以进行完整的项目重建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆