XCode 4 Archive Help (I'm helping, not asking!)

47 views
Skip to first unread message

drewm

unread,
Apr 9, 2011, 7:32:31 PM4/9/11
to Three20
Found a few hitches in Xcode 4 that were making things really
difficult and annoying when trying to build and archive. It's mind-
boggling how annoying this stuff is. It's really frustrating because
there are no compilation problems when building to the device or
debugging, which strikes me as ridiculous. If you're going to fail, do
it early so I don't get my hopes up!

In any case, here are two tips in addition to everything else that has
been posted on this topic. These two points finally sorted me out. One
is a settings fix (per user) and one can probably be added to the
instructions and build scripts.

1. Double check your "Build Products Path" in your project Build
settings. By default, it should just say "build". Mine was pointing to
an old build products location that I had configured in Xcode 3 and
that was migrated over. You're supposed to be able to fix this in
Xcode preferences, under "Locations", where you pick the derived data
location. But there are still settings that "stick" incorrectly that
you can only clean out by fixing the Xcode preferences plist file. If
you don't see "build" in "Build Products Path", open up ~/Library/
Preferences/com.apple.dt.Xcode.plist". Clear out the values under the
"IDEApplicationwideBuildSettings" key. Restart xcode. Your "Build
Products Path" should be the default now.

2. I found weird stuff with archiving on a project whose target name
had a space in it. Repeated attempts to remove the space didn't seem
to "take", and the header search paths that you enter for three20 were
getting broken up into separate switches on the compile command line
call based on where the spaces were. Again, I removed the spaces from
everything in my build settings but wonderful Xcode still tried to use
the old name. The solution was to put quotes around the values you
enter into "Header Search Paths", following the three20 build
instructions. So, instead of ${BUILT_PRODUCTS_DIR}/../three20, you
should enter "${BUILD_PRODUCTS_DIR}/../three20", making sure the
quotes are added. This ensures that the expanded value won't get
broken up.

These saved me, though both were pretty much (IMHO) caused by things
that shouldn't be happening in Xcode 4. So glad Apple decided to waste
days of my time with IDE bugs. Here's hoping that the newly announced
"appCode" from JetBrains lets me say goodbye to Xcode forever....
Reply all
Reply to author
Forward
0 new messages