LoginSignup
132
128

More than 5 years have passed since last update.

Xcode8に移行してビルドが遅くなったのを直す

Last updated at Posted at 2016-11-11

結論

HEADERMAP_USES_VFSというオプションをYESにすると差分ビルドが効く様になり、ビルドが速くなりました。

概要

Xcodeのversionを8に上げてから、自分のプロジェクトでは差分ビルドが全然効かず、少し変更を加えただけでフルビルドが掛かってしまう状態でした。

そこで直し方を調べたところHEADERMAP_USES_VFSというオプションをYESにすると差分ビルドが効く様になるということでした。

自分の環境は

  • Xcode Version 8.0 (8A218a)
  • Swift2.3

です。

やり方

XcodeのBuild Settingsを開きます。

HEADERMAP_USES_VFSのオプションは、元からあるわけでは無いので、自分で追加します。

スクリーンショット 2016-11-11 21.16.40.png

開発時に差分ビルドが効けば良いのでdebugのときだけYESにしました。

スクリーンショット 2016-11-11 23.08.02.png

これでビルドが速くなります。
理由については調べきれてません。

参考

apple社員の回答

ddunbar
Oct 18, 2016 2:05 PM
(in response to aandrewc)
My apologies to everyone experiencing this problem, we are actively trying to get to the bottom of this issue.

If anyone experiencing this problem is in a position where they can share their entire project, as well as a video of experiencing the bug (ideally multiple times) via a screen recording, that would be immensely valuable to us.

In the meantime, we believe that setting:

  HEADERMAP_USES_VFS = YES

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.
132
128
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
132
128