XCode hangs when archiving

2019-07-24 19:31发布

When I try to archive one certain project, Xcode fails to respond. If left alone he manages to open the Organiser after a long period. The archive is there. If removed manually from library/developer/xcode/archives Xcode responds again.

It happens just with this project, all others archiving just fine.

As if Xcode has major problems with the project.

We are using Xcode 4.2.1 but tried 4.3 too (same result).

Any idea what might be wrong?

3条回答
可以哭但决不认输i
2楼-- · 2019-07-24 20:23

Also battled for hours with this problem. In my case XCode was crashing when archiving or running unit tests.

In my case the info.plist values weren't valid. I accidentially added the icon array to the "CFBundleIcons" key like that:

<key>CFBundleIcons</key>
   <array>
      <string>MyIcon</string>
      <string>MyIcon@2x</string>
   </array>

I solved the problem by reorganising the keys in the following way, as they should be:

<key>CFBundleIcons</key>
   <dict>
      <key>CFBundlePrimaryIcon</key>
      <dict>
         <key>CFBundleIconFiles</key>
         <array>
            <string>MyIcon</string>
            <string>MyIcon@2x</string>
         </array>

So you might want to check your info.plist for errors when your application installs and runs as it should but couldn't be archived or unit tests crash XCode.

查看更多
时光不老,我们不散
3楼-- · 2019-07-24 20:26

Why does xcode 4.3.2 hang when archiving?

This above post has the correct answer to this problem. I've been fighting this one for a while and running xcode-select -switch /Applications/Xcode.app/Contents/Developer/ fixed it.

The explanation is that some old commands got left in the xcode 4 installer.

查看更多
爷、活的狠高调
4楼-- · 2019-07-24 20:28

I had similar problems I found that a symbolic link I did was the cause of the problem from /Developer/usr/bin to /usr/bin (because Xcode 4.3 moved some of the execs)

查看更多
登录 后发表回答