Building & Archiving in Xcode 4.0
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Helvetica} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Helvetica; min-height: 16.0px} span.s1 {text-decoration: underline ; color: #0f3a8a}
With the recent release of Xcode 4.0, with its much improved user interface (finally a single window for everything!) and other nice new features such as Git integration we made the jump and switched over completely. All these nice features, however, did come at a price when we finally tried to push version 1.2 of <a href="http://www.terminaleleven.com">SkyView</a> up to the market.
The way our project is setup we have several static libraries we link in, including one 3rd party library that is quite large. When following the Xcode Archive & Distribution guide on the Developer page, it indicates you should set the "Skip Install" setting for your target and each static library built in your project to "Yes" for distribution:
This tells Xcode that for the Distribution build configuration it should produce a single contained executable -- this is required for submitting the archive to the App Store. Here is where the problems begin. Apparently there is currently a bug in Xcode 4.0 that prevents a proper archive from being created when this setting is set to "Yes" for <i>any</i> of your static libraries and targets.
In addition to the above bug in Xcode, we also were forced to go through our project and remove any static libraries we were building and include the source directly into our project (except for the 3rd party library). After doing this, and setting each of the Skip Install lines to "No" for our single remaining static library and target, things archived properly and we were able to submit.
Another note, if you are trying to run Product > Archive and nothing shows up in Organizer after it succeeds this is most likely because you are linking in some static libraries and it is still building their source. We had to <b>uncheck</b> "Find Implicit Dependencies" in your active Scheme's "Build" section. With this enabled Xcode automatically tries to discover and build other dependencies automatically, and in our case, incorrectly.

