July 2008

Xcode 3.1 Addition: Adding Libraries to Target

Xcode 3.1 added a feature that simplifies adding dynamic libraries to an Xcode project. When you open a target’s information panel and click the General tab, the information panel shows the frameworks and libraries that will be linked to the target when you build it.

To add a library or framework to the target, click the + button. A sheet opens with a list of all the frameworks, dynamic libraries, and object files for the active SDK you’re using. Select the libraries and frameworks you want to add, and click the Add button.

If you want to add a third party library or framework that’s not part of the SDK you’re using, click the Add Other. An Open File dialog box will open, which you will use to navigate to the location where the library or framework resides.

No comments | Trackback

Installing Xcode in Non-Default Location

When you install Xcode the default install location is the Developer folder on your startup disk.

/Developer

Xcode 3.x gives you the option of installing Xcode wherever you want. This feature comes in handy if you want to have two versions of Xcode installed on your Mac. To install Xcode in a different location, choose a custom install. You will see a column titled Location with a pop-up button cell with the value Developer. Click the button and choose Other. You will be prompted for a location to install Xcode.

If you choose to install Xcode in a location other than /Developer, make sure the path to your install location contains no spaces. If there are spaces in the path, you can get hangs and crashes in the Xcode Tools. I made the mistake of installing Xcode 3.1 into a folder titled Xcode 3.1. Interface Builder 3.1 would hang and give me the spinning beach ball with certain nib files. I couldn’t figure out what was causing the hang until I read on Apple’s Xcode mailing list about Interface Builder crashing when there were spaces in the installation path. I changed my folder name from Xcode 3.1 to Xcode3-1, and the Interface Builder hangs went away.

Hopefully this post will save someone the pain and aggravation I went through.

No comments | Trackback
Powered by WordPress