Archive for the ‘Xcode’ Category

Please help, I’m missing a link

Thursday, November 16th, 2006

I’ve lost a link. It happened when I was browsing away, jumping from site to site, as you do. Anyway back to the matter at hand. The link I have in my mind refers specifically to a tool that backs up Xcode projects to a zip file. Does anybody know the tool I mean? Please get in touch!

Do not fear the NIB!

Wednesday, November 1st, 2006

In all of my Cocoa adventures to date, the creation of graphical user interfaces (GUIs) using Interface Builder has been both the best part of the experience and the worst. Coming from a java background I had previously hand coded all of my GUIs, and in the process have gained a valuable insight into the dreaded GridBagLayout manager (yes I am aware of the various java GUI designers, but I have never found one that I like using).

In the early days it was fantastic to create a native GUI with ease pushing the components around, conforming to Apple’s human interface guidelines was a mere snap away. I was blown away, I was able to take charge of tables like never before! But as I began to understand a little more Cocoa and move away from the tutorials I got a little lost. Where do I put this object? Should I instantiate it in the NIB or from the code? I did (and *occasionally* still do) miss connections, and then wonder why things aren’t happening.

However recently I’ve noticed that I am getting better at understanding where to instantiate objects, and how to link code to NIB files and so on. In the event of any unexpected behaviour, a systematic approach seems to solve most bugs and I can finally spot missing actions. It may take time, and even a little patience, but as you travel on your quest for more cocoa knowledge do not fear the NIB!

DMG build phase for Xcode projects

Sunday, September 10th, 2006

I’d been meaning to put together a script to automate the creation of disk images for a while now. I thought I’d link it in with the build phase, so I could have a brand spanking new disk image for each build. I’m placing the script below for anyone to use.

imagename=”$PROJECT_NAME.dmg”
if [ -e "$imagename" ]
then
rm “$imagename”
fi
hdiutil create -srcfolder $CONFIGURATION_BUILD_DIR -volname “$PROJECT_NAME” “$imagename”

It’s all fairly simple bash script, and logically executes the statements. The most difficult part of the project was remembering to escape the variables in the hdiutil command. The next step will be subversion integration for version numbers. Stay tuned!

Technorati Tags:
,