background preloader

iPhone OS Development

Facebook Twitter

iPhone Tools

The iPhone SDK: APIs Apple Didn't Want You to Know About - O'Rei. By Jonathan Zdziarski 03/25/2008 Author's Note: Special thanks to Jay Freeman (Saurik) who has done remarkable work in updating the open source tool chain to support iPhone v2.0 With the release of Apple's SDK for building iPhone applications, many have plunged head-first into this new platform for the first time, with the new-found excitement that comes in discovering something entirely new and innovative. The energy surrounding the iPhone has been building steadily since its release last June, and Apple's initial "beta" offering of their SDK gave developers many of the tools they needed to get engaged.

Within a short time, however, the community hit a brick wall in many respects, leaving many disenchanted by the restrictions imposed on developers. A little bit of history is required to fully appreciate this debacle. Since June 2007, the open source community had been hacking on the iPhone and developed a huge audience (estimated to be around 40% of the market). Now you're ready to go! Open iPhone SDK: Adding Application Badges - O'Reilly Digital Me. If you’ve used the iPhone or iPod touch for any time, you’ve likely seen the small red badges that appear over applications on the home screen. These might indicate the number of missed phone calls or unread emails that accumulated since the user last opened Phone or Mail.

There are actually two ways to go about badging applications: one, an extremely simple UIApplication call, the other a slightly more involved tunneling into UIKit. To set an application badge from within the program itself, use setApplicationBadge:. Pass it an NSString as its argument, limiting the string size to 4 or 5 characters at most. For example, you could badge an application with the 3-letter abbreviation for the current month: NSDate *now = [NSDate dateWithTimeIntervalSinceNow:0]; NSString *caldate = [[now dateWithCalendarFormat:@"%b" timeZone:nil] description]; [self setApplicationBadge:caldate]; To remove an application badge, pass the empty string, i.e. @””. Using Application Badges. Several native applications on the iPhone use application badges as an indicator of new messages, think email and SMS. Creating badges is quite straightforward and is nothing more than a method call, passing in the desired number to display. The image below shows how a badge may look when applied to your application.

The code to create the badge is below the image. As one would expect, the iPhone does limit the number of digits it will display – see the code and image that follow: One nice feature that would be welcome is to have a means to create a badge with text. Although you can set a badge for an application icon, I believe the real creative uses of this will evolve if/when Apple provides a means for an application to update the badge when the application is not running. I’ll keep my fingers crossed… [Tutorial] Hooking SpringBoard - iPod touch Fans forum. Code the Code - Projects - class-dump.

This is a command-line utility for examining the Objective-C runtime information stored in Mach-O files. It generates declarations for the classes, categories and protocols. This is the same information provided by using ‘otool -ov’, but presented as normal Objective-C declarations, so it is much more compact and readable. Why use class-dump? It’s a great tool for the curious. You can look at the design of closed source applications, frameworks, and bundles. Download Current version: 3.5 (64 bit Intel) Requires Mac OS X 10.8 or later. Changes - News Contact You can email questions and bug reports to me at nygard at gmail.com.

Usage License This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.