Erica Sadun on Developing Mobile Applications with the iPhone SDK
InformIT: Originally, the only "applications" that could be developed for the iPhone had to run through Safari and be written in Ajax. With the SDK, you can now get down to the metal of the iPhone. How does having this extra capability open things up for developers — will we be seeing some real breakthrough apps now that the whole device has been opened up?
Erica Sadun: Albertson's, my local supermarket, used to be a real sticking point for me. I simply could not get EDGE coverage inside that big, industrial building. I'd try to load up one of those Safari-based shopping-list applications on my iPhone and get absolutely nowhere. The iPhone was crying out for native applications that didn't depend on signal strength. Now, I have a native shopping-list app that works even when I'm at Albertsons.
IT: How are native applications distributed? Are they downloaded and installed from the EDGE network, installed via a sync from a computer, or do both ways work?
Editor's Note: The launch of the App Store a few months after this interview was posted pretty much answers this question as of today, however it should be noted that the App Store did not exist until the release of the iPhone 3g.
ES: Right now there are a variety of iPhone application solutions — from direct file connection with a PC and Mac to the more popular over-the-air Installer.app solution. The great thing about Installer.app is that you can add new software no matter where you are. I think once an iTunes-based installer appears that people will also really latch onto that.
IT: How easy is it to access the hardware itself? Will we be seeing not only software, but also some hardware-based apps? (For example, external barcode scanner, AM/FM tuner, etc.)
ES: Right now, programmers have gotten access to most of the onboard hardware including the built-in iPhone camera and the unit's accelerometer. I hope that trend continues with the upcoming SDK, because much of what makes the iPhone such a compelling platform to write for is based on its hardware. Right now I have an application I just built that scans for local wi-fi hotspots and cell towers and reports the iPhone's location to Twitter. This does two things: It lets me find my iPhone if it gets lost, and it lets my family know where I am in real time.
IT: There's a thriving community of developers writing native apps now using the unofficial SDK. Given that Lucas Newman (who was instrumental in getting the unofficial SDK going) is now an Apple employee, do you think the official SDK will share some of the same development tools and techniques? Be mostly similar?
ES: I do think that the SDK will look very much like what we're using to develop applications right now for practical reasons. When reverse-engineering the onboard frameworks, we've basically re-created what Apple uses to build its own applications. There's almost no difference between an application I've written and one that Apple has from a coding point of view.
IT: Any hint if the official SDK will render "jailbreak apps" useless (require a full restore), or will they play nice together?
ES: It's really hard to make a call on this one, but I do not expect the jailbreak community to go away any time soon. The jailbreak applications are popularizing the platform and increasing sales. Apple would be foolish to permanently block this development avenue.
IT: What kind of security measures are implemented in the SDK? Is there a chance we'll be seeing malware, viruses, and other bad stuff in the not-too-distant future?
ES: As I have written extensively at the Unofficial Apple Weblog, there is no quantifiable difference in security between developing for the iPhone or for the Mac or for any other platform. You just have to hope that there isn't a big financial incentive for hackers to aim for the iPhone as a target. Right now, the bad guys are doing best by exploiting Windows with its much larger install base, but that could change at any time.
IT: What are the must-have features for the official SDK?
ES: I'm really looking forward to a computer-based simulator, and I really hope Apple includes this as part of the SDK. I'd also really love to see debugging support and performance monitoring. It's still too early to call how Apple intends to handle iTunes software distribution, but I really hope they'll open it up to hobbyists and not just to commercial enterprise.
IT: How did you come to work with the unofficial SDK? Just couldn't wait the official, sanctioned version?
ES: I've never met a gadget I didn't need. And when Patrick Walton at the University of Chicago (aka Nightwatch) released his first iPhone toolchain, I was so totally there. This was the new frontier and I wanted to see what it could offer.
IT: You're currently working on The iPhone Developer's Cookbook. Tell us about the types of "recipes" that will be included in the book.
ES: I'm packing that cookbook with what I call "practical programming," the things that you need to use all the time to develop iPhone and iPod touch applications but that you won't want to have to develop from scratch. I've been running the recipes past many of the biggest iPhone developers and getting some fabulous feedback — they're already starting to use these recipes as a reference in their day-to-day programming. So from that point of view, it's already proving a success. I'm hoping it will help new iPhone developers get up to speed by offering ready-to-use solutions rather than just a general discussion of the material. It's a really exciting project and I'm having a blast writing it. I'm trying to build exactly the kind of reference I wish I had when starting out.