7

Xcode 6.3 gets stuck on "compiling swift source files" when I try to build for archive! it gets stuck on "compiling last two or three swift files". I waited nine hours but did not happen anything. Do you have any ideas for this problem ?

  • 1
    just quit the xcode, delete all derived data..then restart xcode, clean it then try to build. – iAnurag Jun 03 '15 at 09:02

2 Answers2

5

Just try to enabling Whole Module Optimization

enter image description here

This link can help you.

https://developer.apple.com/swift/blog/?id=27

Ravi Gautam
  • 960
  • 2
  • 9
  • 20
  • Solved it for me, on XCode 7.0.1 – Chris C Oct 12 '15 at 15:14
  • 3
    In my case it helped to switch Optimization Level to None for release. But I would not have guessed it without your answer. – Dmitry Nov 09 '15 at 19:10
  • My Project got a bit bigger on this version because of multi language stuff. Added a couple hundreds of strings and variables. The result? It was compiling and working, but couldn't archive to submit to the App Store. This answer made Xcode archive in seconds the app! Just changed to NONE and it was done! Thank you so much! – tomDev Sep 28 '16 at 06:04
0

For me, other solutions don't work for me. I tried to run the commands in Report Navigator and found the stuck file. Here is the study http://applytech.me/blog/build-stuck-after-upgrading-from-xcode-6-to-xcode-7/

Cuong Thai
  • 1,165
  • 1
  • 11
  • 24