Tuesday, January 18, 2011

Rebirth

Well, I certainly (as most bloggers do) had grand hopes for providing more content than once every 4 months. I've had a plethora of "a-ha" moments since my last psot, followed by "wow, I've got to blog about that", followed by "wow, am I really gonna blog about that before doing XXX."

Anyways, (as most bloggers are wont to do), I'm going to promise to try to write a bit more often. It'll help if you guys give me an occasional prod. :-)

This last week, I became a proud card-carrying member of the Apple developer community, having purchased a 13" 2.4GHz MacBook Pro so that I could do native development on a couple of projects I'm working on.

My initial thoughts are that I'm very much smitten by the whole Mac ownership experience. It's so....NICE having a computer and OS that doesn't freeze every 10 minutes for some random activity, whose bluetooth works seamlessly, where having a UNIX shell isn't the bastardized hack that Cygwin has become, and I can have the oodles of apps that I like to have open at once with zero impact on performance.

My big growing pain has been adjusting to the differences in keyboard layout and shortcuts. Those of you who know me well know that I live and die by the keyboard, only resorting to mouse/trackpad as a last resort. And while my fingers have almost gotten used to where to go to hit control-A to go to the start of a line, switching back and forth between PC and Mac keyboards is still a problem for me. I'm sure I will adapt, eventually.

As far as development goes, the XCode SDK is still a bit of a mystery to me, but I'm slowly figuring it out. Luckily, I'm not having to learn Objective C yet, although that is certainly around the corner.

I did figure out one really weird problem that was plaguing me, and while I'm usually quite adept at Googling for solutions to problems like this, I couldn't find any references to it. So, here's a quick summary in the hopes that it will help someone out:

I was able to build and run my app with no problems, both in the simulator and on my device. But then I wanted to archive a build to send as an ad hoc distributable, I ran into problems. I selected "Build and Archive", a dialog box popped up that said:

"Unable to create application archive directory. To view or change permissions, select the item in the Finder and choose File > Get Info."

Sounds reasonable. Only, I had no clue where this "archive dirctory" was. Must be in the project settings somewhere, right? Nope. XCode preferences? Uh uh. Probably a trivial task for someone more familiar with this environment to dig into whatever XCode's equivalent to makefiles is to figure this out, but for noob me, I was stumped.

I did find a script that performs the build and archive steps from the commandline. Running this script produced a similar error to the dialog I was getting in XCode - with the additional useful information of the directory name
/Users/xxx/Library/Application Supprt/Developer/Shared/Archived Applications

And sure enough, the directory was owned by Root and permissions were 755, so one quick chown and I was back in business.

I'm not sure how the permissions got screwed up in the first place or whether I did something that caused the permissions to get changed, but hopefully this will help someone who encounters the same problem.

Until next time...

No comments:

Post a Comment