Archive | October, 2012

misadventures of an xcode idiot

17 Oct

More proof that life is hard. This post details some of the mistakes you might make trying to use xcode as a complete beginner (to xcode and macs in general!)

I decided to use libxml for XML-parsing on an iphone app, since it comes in the dev environment by default and doesn’t require you to use an event-based parsing method. Tutorials say that you must link to the library, and set up your include paths to find the proper headers. Standard stuff, so let’s get started!

I can see the libraries my project is already linking to in the document view of xcode, so logically I’ll just right-click there and add a new one. I don’t see anything to add libraries to link to specifically, so perhaps “add files” will simply infer from the type…

First, I don’t know where this file is. Other tutorials will tell you it’s found in /Developer/Platforms/iPhoneOS.platform/... There’s no /Developer on my machine. Maybe it exists on “real” macs or maybe the first part of the path is so obvious everyone omits it. So find it the old fashioned way:

What I’m looking for seems to be in /Applications/ Let’s add it.

Hm. No subfolders in /Applications in this finder-ish window, just icons. Well, maybe they are really subfolders and they just have icons? Double-click xcode to find out.

Bad idea! This “adds” the xcode application itself to my project somehow, and whatever it does causes the running instance to hang for several minutes. Kill the xcode process in terminal, and try to re-load it? Hangs on startup. Don’t be like me. Luckily I was able to revert the project file using source control.

So for this to be of use to anyone, I should describe the non-stupid way to do this:

Click the project itself in your xcode document list, go to “build phases”, and add to link with binaries.

This automatically navigates to the right directory and gives you a handy search bar, which you can use to find libxml.

Then go to the “Build Settings” tab, be sure to select “All” settings instead of “Basic”, and update your include paths. (/usr/include also didn’t exist on my machine but it finds the right place anyway).

After this configuration, you can return to the easy, relaxing task of coding. Good night.


New Gadget!

5 Oct

I’ve finally set up my latest gadget, a wonderful device that anyone would enjoy. It’s the turtle mouse!

I always thought my mouse was too mousey, but now it can be a turtle. It really just looks like a turtle, not much like a mouse at all. It’s also got some good features like a thin & soft USB cable

You’re probably thinking, “there’s no way the cable is thin AND soft”. But this is not false advertising folks, the cable really is thin and soft.

The only downside to the turtle mouse is you don’t want to give it to a child age 0-6, since it’ll make them sad 😦

And best of all, much like a real turtle it lights up when you plug it in! If you enjoy turtles and mice that look like turtles, I can recommend this gadget to you. Good night and sleep tight!