Posts Tagged 'Xcode'

Roundup: Xcode Tips

Aaaaand to celebrate today’s release of the iPhone OS 3.1 SDK with the latest Xcode versions for Leopard and Snow Leopard, let’s make a list of useful Xcode tips and resources from around the web, shall we?

Oldies but goodies:

Stack Overflow’s Xcode Tips And Tricks

Mobile Orchard’s 14 Essential Xcode Tips, Tricks and Resources

Up-to-the minute stuff:

Static Code Analysis (Clang) and Xcode 3.2

Xcode 3.2: teh awesome edition

Complete Xcode Keyboard Shortcut List

clang Source Annotations

Helper Goodies:

GrowlCode

BuildCleaner

Accessorizer

Any others you find particularly useful, Dear Readers?

Continue Reading →
0

Tool: BuildCleaner

Here’s a handy little utility called BuildCleaner for, eponymously enough, cleaning up all those Xcode build folders that litter your drive:

I just wanted to let you know of a little utility app I’ve just posted, called BuildCleaner. As I explore example projects, open source frameworks, and test applications, I find that I usually have a lot of build folders cluttering my hard drive. When you combine that with backup services like Time Machine, Mozy, or DropBox, you can waste a lot of your bandwidth uploading build folders.

To help with this, I’ve created BuildCleaner. It’s a little menubar application that scans your hard drive every few minutes for build folders and deletes them if they haven’t been modified recently (you can change the cutoff interval in the settings window). You can also tell it to ignore the build folders of specific projects, such as the humongous project you’re following that takes ages to compile, but you only crack it open every couple of days…

Handy, indeed. And it’s been open sourced on github for your tweaking pleasure as well!

h/t: cocoa-dev!

Continue Reading →
1

Xcode predefined macros

Here’s a couple tips for finding what macros are defined/available in Xcode that showed up on xcode-users for the question

Hi, I’m looking for information on Xcode or the preprocessor that would indicate whether or not my code is being compiled for a non Mac GNU target or Mac OS X or iPhone OS…

You might have known this answer, how to print out a list of gcc predefined macros from the command line:

gcc -E -dM -x c /dev/null

But we’ll just bet you didn’t know how to extract them for a particular file in compilation context!

The easier way to do this (and get more precise, per-target-per-configuration results from Xcode) is to select a source file, Get Info, click the Build tab, add -dM to it, then Preprocess that source file.

You know, there’s been times when porting particularly convoluted befuddlements of allegedly cross-platform libraries that having known that tip would have saved us literally days of flailing around…

Continue Reading →
1

Tools: Accessorizer

This looks like it might be a handy tool for the Xcode programmer: Accessorizer!

Accessorizer saves you tons of time … Those minutes add up  to hours, days and weeks over the lifetime of a project.

Accessorizer selects the appropriate property specifiers based on ivar type – and can also generate explicit accessors (1.0) automagically …  but Accessorizerdoes much, much more …

Accessorizer will help provide you with the init, keypath, keyed-archiving, indexed accessors, accessors for unordered collections such as NSSet, copyWithZone, KVO, key-validation, singleton overrides, dealloc, setNilForKey, non-standard attribute persistence (Core Data), locking, headerdoc, convert method to selector, NSUndoManager methods and more.

Well, it does sound handy, doesn’t it now. Anyone out there tried it? Worth the price you figure?

h/t: iPhone Development Blog!

Continue Reading →
3

Tip: Debugging exceptions

Don’t you just hate it when you finally get your program linking, you run it, and instead of seeing your glorious code executing away you get something like this?

2008-11-13 21:12:25.866 Play MPE[1369:20b] * -[PMPELoginViewController loginSucceeded:]: unrecognized selector sent to instance 0x40d560

2008-11-13 21:12:25.867 Play MPE[1369:20b] * Terminating app due to uncaught exception

Most annoying, that. So what can you do to catch that kind of nonsense in the act? Or other runtime failures?

Well, the Breakpoints window in Xcode (Run > Show > Breakpoints) is your friend. Simply add these project or global breakpoints:

objc_exception_throw

+[NSException raise:format:]

_NSAutoreleaseNoPool

_objc_fatal

malloc_error_break

and then hey presto, the debugger comes up stopped on the source line, in this case

[self loginSucceeded:loginResultData];

Much easier to debug, that!

[EDIT: And here's some others you might try as well:

NSInternalInconsistencyException

NSInvalidArgumentException

]

h/t: iphonesdk

!

Continue Reading →
0

All about C99

Yep, we’re always on the cutting edge of the latest news and breaking developments here Under The Bridge, so today we’re going to talk about — wait for it — the C99 standard for the C programming language!

Um, you may understandably be thinking, how does ISO/IEC 9899:1999, published 1999-12-01, qualify as a breaking development now exactly?

Well, grasshopper, it’s a breaking development because it has recently come to public light on the xcode-users list that recent versions of Xcode have changed the default C language dialect to C99, apparently deciding that GCC 4.0′s C99 feature support can now be deemed complete. So that means that if you’re using Xcode to target Any New Device Currently Under NDA™, it would behoove you to clue into just what’s changed and different in this “new” version of C. And, conveniently, this fine fellow David Hoerl has put together a reading list for us:

It took a while but I finally did uncover a really good series of articles written by Randy Meyers for the C/C++ Users Journal several years ago. Posting these here in case you have been thinking of doing the same in the near future:

The New C: Introducing C99

The New C: It All Began with FORTRAN

The New C: Integers, Part 1

The New C: Integers, Part 2

The New C: Integers, Part 3

The New C: Declarations & Initializations

The New C: X Macros

The New C: Compound Literals

The New C: Why Variable Length Arrays

The New C: Variable Length Arrays, Part 2

The New C: Variable Length Arrays, Part 3

The New C: Variable Length Arrays, Part 4

The New C: bool, Advice to C and C++ Programmers

The New C: Inline Functions

Statements and Loops

Floating-Point Math

About // Comments

And if you’re not satisfied by all that, there is also available The New C Standard: An Economic and Cultural Commentary, a 1615-page book which annotates the entire standard, sentence by sentence. And it’s completely free, as Addison-Wesley backed out of publishing it once they got a look at it. Probably not a wholly indefensible decision on their part, as it’s not exactly what most people would consider a gripping page-turner, but it is remarkably exhaustive in its coverage. 

h/t: xcode-users!

Continue Reading →
0

Under The Bridge Store now open!

So we’ve created an Amazon store to guide the Gentle Reader to how they should go about building their iPhone programming library, as well as — hopefully! — support further building out our own.

It is, naturally, called the Under The Bridge Store. Take a look now!

The layout is, the front page “Coming Soon!” is things that we haven’t examined personally, but we figure probably will turn out worth buying. Whatever earnings this store produces will be applied directly to buying things on that page, and we’ll review them here, and then either move them to the other categories or delete them as we judge appropriate.

The other categories are all books that are, indeed, in our reference library right now, and we believe should be in any iPhone programmer’s library, divided by main focus into “Programming – iPhone”, “Programming – OS X”, and “Programming – General”. We may get around to specifically reviewing those at some point in the future — although hopefully we’ll be focusing on exciting new goodies instead of the old stalwarts — but they all have at least a few Amazon reader reviews so you can go by those in the meantime.

Browse, enjoy, and buy!


Continue Reading →
0

Job: ModernFeed.com

Here’s what looks like it could be an interesting full-time job for any of you other budding iPhone developers out there who are in/will move to Los Angeles:

Modern Feed & Supply, Inc. is a start-up based in Los Angeles. Our website was launched at the end of March and has since received numerous accolades. The Modern Feed mission is to make it simple to find and view high-quality full-length programming online. Programming spans the gamut between “Lost” and the “Nobel Peace Prize Lectures.” For us, the experience is not limited to just your computer. Our first mobile Modern Feed implementation is on the iPhone but we will expand to many more devices.

(more…)

Continue Reading →
2