Archiving stuck at compiling swift source files

I am using XCode Version 8.2.1 (8C1002) product. I archive to upload my app to the iTunes Store, which has been stopped for several hours in the 'Compiling Swift source files' section. The actions I have taken to solve this problem are as follows, but have not been resolved.

  1. Product> Clean
  2. Product> Clean Build Folder
  3. OS reboot
  4. Sign out and sign in
  5. Even up to hardware memory upgrades

The biggest question is that the test runs well on all devices. However, when I try to archive, it stops at that section without any error message.

Replies

Did you find any solution for this problem?. I am having same problem. I am able to run app in simulator and devices but while archiving it sticks after compiling all the libraries.
Im facing the same problem, I tried re installing pods, restarted Xcode(11.6), restarted mac as well. But again it gets stuck at same while archiving "compile swift source files".
Any news? I am having the same issue. I also get a notification from my mac after a while, which tells me I need to free up RAM memory.