category_name=blog%2Fobjective-c

Heading to Big Nerd Ranch later this month!

October 3, 2010 | Comments Off

One of the podcasts I listen to on a regular basis is called MacBreak. The hosts are Leo Leporte, Alex Lindsay, Andy Ihnatko and a rotating list of other Mac/Apple/iOS luminaries. If you aren’t familiar with it head over to http://twit.tv/mbw and have a listen. It is highly recommended for anyone interested in all things Macintosh (and iOS too).

A few episodes ago Alex Lindsay mentioned that his company was going to be hosting a one week Commuter iOS Class at their San Francisco offices so their team could come up to speed developing applications for iOS devices. The class would be taught by the folks from Big Nerd Ranch. Usually the BNR folks teach classes from their monastery at a secret location just outside Atlanta, Georgia. Having them venture out to San Francisco; wow, what an opportunity. Oh, did I mention that Alex Lindsay also announced that there were a limited number of spots open to the unwashed masses to attend and the class would be held from 2:00 p.m. until 10:00 p.m. each day so folks could continue to do at least part of their day jobs.

All in all this just sounded too good to pass up so I fired off an e-mail to the folks at BNR to let them know I wanted to attend. My fingers were crossed because I know how quickly their classes fill up. Needless to say I wouldn’t be writing this post if I didn’t get in. :-)

So, I’m off to the Pixel Corps offices later this month to soak up some more iOS goodness. Hope to see a few of you there too.

BTW: Here is a link to the course description for anyone curious.

Attending iOSDevCamp 2010 – Building Meet4Drinks

August 19, 2010 | Comments Off

iosdevcamp2010.png
I am attending the yearly iOSDevCamp event this weekend in SanJose, CA. This is a great event where iPhone/iPad software developers and UI/UX designers come together for a weekend of coding and exploration of ideas around how to use iOS devices. The event organizers hold something called a Hackathon where attendees form ad-hoc teams around shared application ideas and spend two full days designing and coding like crazy to build something cool. Everyone has a great time and meets like-minded folks in the developer community.

Earlier this year, in April the event organizers held a special iPadDevCamp. That was my first exposure to this great event format. You can read more about that experience over on the Powered By AMP blog. For that event I was on a team with some co-workers from Auctiva. We built a prototype of an e-commerce sales management tool for AMP sellers.

This time I’m attending solo, without a cadre of other Auctiva designers and developers. I want to explore developing location-aware applications for the iPhone and put together a basic idea for an app. It is called Meet4Drinks, and you can read more about it at http://www.meet4drinks.net.

If it sounds like something you would enjoy, it’s not too late to register today. The event starts tomorrow (Friday) evening and goes through Sunday evening. Visit http://www.iosdevcamp.org to register.

Look for updates on Meet4Drinks next week, once my head is back above water after the event. Hope to see you there.

Busy Folks at Big Nerd Ranch!

May 1, 2010 | Comments Off

The folks over at Big Nerd Ranch are really busy these days. In addition to building a new learning center it looks like they are writing no less than three new books to be released this year. If you have ever read through Cocoa Programming for Mac OS X by Aaron Hillegass or had the fortune to attend one of his classes then you already know that these new books will likely become a core part of your programming library in the future.

The first new title is iPhone Programming: The Big Nerd Ranch Guide, written by Joe Conway and Aaron Hillegass. According to Amazon this book will be available for purchase on May 4th in paper form and May 6th for the Kindle. You can pre-order it now.

The second new book is titled More Cocoa Programming for Mac OS X: The Big Nerd Ranch Guide and is being written by Aaron Hillegass and Juan Pablo Claude. According to Amazon’s web site this book will be available in mid-July, 2010. At this point it appears the book will only be available in print form. Hopefully this will change and a Kindle version will be made available.

The third new book will be titled Objective-C Programming: The Big Nerd Ranch Guide and is being written by Aaron Hillegass and Mark Fenoglio. Amazon pegs the release of this book sometime in December, 2010. Cover art for this book has not been released yet.

Setting up Unit Testing in Xcode 3.1

July 28, 2008 | 2 Comments

Xcode includes OCUnit, so you don’t need to get a copy. But, you might want to take a look at their website (http://sente.epfl.ch/software/ocunit/) for information and tutorials on how OCUnit is intended to be used.

If you are planning on doing Test Driven Development (TDD) you may also want to get the following packages:

Other good articles on Xcode Unit Testing that I came across:

By reading through the documents references above I was able to get OCUnit up and running for one of my projects. It took a bit of experimentation, but in the end it looks like OCUnit will work just fine for doing TDD in Xcode with Objective-C. Anyone wanting to try out TDD should give it a try. The benefits for your project are significant. Go for it!

Method Swizzling in Safari on Mac OS X

May 9, 2008 | Comments Off

Recently I have been working on an extension for the Safari web browser. The biggest challenge when developing an extension for Safari is determining how to hook your code into Safari.app. Most browsers these days provide hooks to allow development of extensions, but Safari does not.

A technique that many people use to add functionality to Safari (and other Cocoa applications) is called Method Swizzling. If you want to learn more about this technique there is a terrific article explaining all the details on the CocoaDev site.

When applying the method swizzling technique you may find that the linker complains about unresolved classes and won’t link your bundle. This issue usually crops up when you try swizzling a method that is in a class you learned about by running class-dump or by using FScript. If you run into this problem bring up the project properties in Xcode and add -undefined dynamic_lookup to the Other Linker Flags section.

Without this extra flag your plug-in will not link, and you will be stuck in the mud! Thanks to Aaron Harnly, author of Letterbox, for pointing this out to me in an e-mail exchange.

Generating a GDB Log File for Xcode Debug Sessions

February 2, 2008 | Comments Off

If you would like to capture a log of everything that GDB displays during a debugging session you can do the following:

$ defaults write com.apple.Xcode PBXGDBDebuggerLogToFile YES

The statement above will turn on logging to a file. Now, you need to set the filename for the debugger output file. Use the following statement to accomplish that.

$ defaults write com.apple.Xcode PBXGDBDebuggerLogFileName /tmp/gdboutput.log

This will create a file in the /tmp directory called gdboutput.log, containing everything you see in the GDB command window during your debugging session.

Both of these commands need to be typed into a Terminal.app window. You only need to do this once, as your machine will remember the settings.

www.idevelopsoftware.com is Stephen Fry proof thanks to caching by WP Super Cache