Utvikling, forum og nyheter om iPhone og iPhone3G

Podcast: Interview With Social-App Discovery App “Chomp” Creators Ben Keighran and Cathy Edwards

Chomp is a social app discovery iPhone app. It’s a bit like Yelp for the App Store.
In this interview with its creators Ben Keighran and Cathy Edwards we talk about the app, the momentum its building, the recommendation algorithm that makes it tick and how app developers can use it to build buzz for their own apps.
You can listen using the Flash player below, download the MP3, or subscribe to the iPhone Developer Podcast using the instructions at the bottom of this post.

For easy scanning of the interview, here’s what was covered and when:

  • 01:00 Chomp: “Social app discovery” or “Yelp for the App Store”
  • 03:00 Reviews like a Twitter stream; follow/followed
  • 06:00 111,000 reviews in the first seven days
  • 08:00 Tens of thousands of users
  • 09:00 A more fair view of apps vs. ratings/reviews in the App Store
  • 11:45 600 reviews/hour
  • 14:00 Recommendations via collaborative filtering (e.g., Amazon or Netflix)
  • 17:00 More reviews = more recommendations
  • 18:30 Algorithm’s training data mined from the App Store
  • 22:00 Revenue from affiliate program
  • 24:30 Chomp first app review/recommendation app to be featured by Apple
  • 25:45 Building buzz for Chomp
  • 28:00 Using Chomp to build buzz for your own apps

Keep up to date with our iPhone developers’ podcast
Subscribe to our iPhone Development Podcast in one of two great ways:

Mobile Orchard Workshops: iPhone Development For Web Programmers, Raleigh/Durham, March 24-25

I’ll be teaching our iPhone Development For Web Programmers class in Raleigh/Durham on March 24-25.
The class is specifically designed to teach professional web programmers — developers who spend their days writing Java, .NET, Ruby, Python or PHP — how to build native apps for the iPhone. No prior Objective-C or Cocoa/Cocoa Touch experience required.
$899 With Early Registration And Reader Discount
The class is $1300. Early bird pricing, valid through 3/1, is $1099. Take another $200 of the price by registering with a “mo” discount code.
Details And Registration

On Language Design: Making Expensive Actions Hard

While abstraction is a great thing, some abstractions are completely unpredictable. For instance, object-relational mappers are very convenient to get started, but if performance is important these frameworks can get very unpredictable performance characteristics. Let’s take Hibernate as an example. Java does not support properties, instead there’s a convention of using getter and setter methods for this purpose. The general assumption is that calling these methods has little overhead:
Person p = em.find(Person.class, "somePersonId");
println(p.getName());
println(p.getFather().getName());

Easy enough. But hang on, what did that third line do? I turns out that it had to execute a SQL query to fetch p’s fatherly Person object. Not a big deal, you’d say. But what if you have code like this in a for loop iterating over 200 person objects? At the face of it, this should be cheap, you’re just doing simple property access, right? However, behind the scenes it executes another query for every iteration, making this simple loop quite expensive at 201 required queries. Sure, you can tell Hibernate to prefetch the father property, and you should, but if you forget you may not notice what’s hogging the database until you start inspecting query logs.
In Java, it is difficult to predict which statements are going to be expensive to execute by inspecting the code.
This is true for practically every programming language, but it’s also a shame. It may be useful to have some kind of syntactical overhead for performing expensive operations. If expensive operations are inconvenient to write, will that not encourage programmers to write more efficient code?

Pre-game show

On Tuesday, Apple released firmware 3.1.3 for the iPhone and iPod touches.  Unless you’ve personally observed a problem with the reporting of your battery percentage, there’s no reason to update to 3.1.3.  We know some of you will want to anyway.  Superbowl Sunday’s PwnageTool 3.1.5 for Mac OS X will let you do so safely, preserving your jailbreak and ultrasn0w unlock.  (If you use the blacksn0w unlock (at baseband 05.11.07), you need to stay at 3.1.2.)
iPhone 3G and 3GS unlockers should always be very wary to update their firmware.  This is no exception.  If you make a mistake along the way you may find yourself updating to official 3.1.3 in which case you will lose your unlock, possibly forever.
iPhone 3GS users (regardless of unlock) should stay away from this and all 3.1.3 jailbreak tools unless you know you have your “SHSH hashes” backed up via Cydia.  That’s because if you make a mistake you may find yourself stuck at official 3.1.3 with no way to jailbreak or come back down to 3.1.2 to jailbreak.
If you really truly feel that you need to update, this version creates a custom 3.1.3 IPSW for you to restore to on your iPhone 2G, iPhone 3G, iPhone 3GS with early bootrom, iPod touch 1G, and iPod touch 2G with early bootrom.  If you don’t know if you have an early bootrom or not, please avoid updating until you learn more.
You don’t need to be pre-jailbroken on anything but the iPod touch 2G early bootrom.  And really for that device, it’s faster and easier to use redsn0w 0.9.4 as mentioned in our last post.  For that matter, if you have an ipt1g, iphone2g, or iphone3g(and don’t need an unlock), you should use redsn0w too (but version 0.9.3).  It’s faster and you won’t have to go through a full restore process (just do an update then run redsn0w, pointing it at 3.1.2 FW instead of 3.1.3).
If you have an iPhone 3GS, PwnageTool works if you’re currently at version 3.1.2 or below (down to 3.0).  You don’t need to be already jailbroken — PwnageTool will ask you if you’re jailbroken after you’ve created the IPSW.  Don’t use PwnageTool on the iPhone 3GS if you’re at 3.1.3, it just won’t work.  Downgrade to 3.1.2 using the methods described here.  If you can’t downgrade because you don’t have your 3GS 3.1.2 hashes on file with Cydia, you’ll need to sit out the 3.1.3 jailbreak.
We aren’t revealing any new exploits to Apple with this jailbreak. Everything here has been used before, it’s just a straightforward port of Pwnage2 and 24Kpwn to the new firmware.  It’s possible the new firmware was released largely to flush out new exploits before the next big release.  We won’t be biting.
We’d really like the above warnings and disclaimers to sink in. Please don’t download the files below and use them blindly.
Please feel free to ask any questions in the comment section below.  We’ve got a bunch of expert help there, including our friendly moderators confucious and angie!
Official Bittorrent Releases

Unofficial Mirrors
The following links are unofficial download mirrors, you download these archives at your own risk, we accept no responsibility if your computer explodes or if it becomes part of a NASA attacking botnet or even worse if your hands fall off mid-way during the use of these files. We do not check these links and we accept no responsibility with regard to the validity of the files, the other content that these links may provide or with the content that is on the third-party linked site.
Always check the files that you have downloaded against our published SHA1 hash. We would prefer that you downloaded the official bittorrent release that is linked above, but you are welcome to try these if you really must. Mirror owners should email direct links only to blog@iphone-dev.org — please don’t place mirrors in the comments as they will be deleted.

This Week In iPhone & iPad News - February 5/2010


How should an iPad app differ from an iPhone app? VentureBeat piece on flirting/dating app maker Skout is adapting their app
All about EPUB, the ebook standard for Apple’s iBookstore
Objective-C client library for TweetPhoto API While other Twitter image posting providers provide REST APIs, TweetPhoto has made a native Obj-C client library available.
The iPad CPU: All You Need to Know About the Apple A4 The fruits of Apple’s $278MM acquisition of P.A. Semiconductor.
Amazon API Use Prohibited From Apps Popular app RedLaser tells the story of Amazon’s refusal to let them use their APIs from an app.
Apple Makes $209 on Each $499 iPad
Bookmarklet As App Store Paid App
Store Kit Simulator New project simulates Store Kit.
Old World vs. New World Perspective piece on the iPad.

Printing

I have modified this blog's style sheets (at the recommendation of a reader) so that they print better. I want to improve the print stylesheet a bit, remove the ads, etc., but what I did should be at least an improvement.I plan to do a writeup of NSConference before too long (short version: it was awesome), and also to finish my Nexus One thoughts, but I'm taking today and the weekend to recover from Jet Lag.©2008-2010 Jeff LaMarche.
http://iphonedevelopment.blogspot.com

persistence.js: An Asynchronous Javascript ORM for HTML5/Gears

The past week or two I have been developing an asynchronous object-relational mapper in Javascript, called persistence.js. Its main use-case, right now, is to simplify the database component of offline-capable web applications, like the mobile web applications that I’m working on. But with some tweaking it should also be usable in server-side applications, like node.js servers. It uses the SQLite database that is available in modern Webkit-based browsers (like Safari 4 and Google Chrome), or the Google Gears datastore that is available in any browser that runs the Google Gears browser extension (like Firefox). It also runs on iPhone (OS 3+) and Android browsers. In its current state it does not run on IE (although I haven’t tested it).
There is one other asynchronous Javascript ORM framework that I know of (Impel), but it has a dependency on MooTools, which would be yet another framework you need to pull into your web application. persistence.js has no dependency on any Javascript framework (other than a tiny Google Gears initialization script in case you want to use Gears).

iPhone Coding Recipe – Shortening URLs

I had some a to shorten URLs for an in-application Twitter client I’m working on and thought I would share my simple solution with you guys.
It’s actually pretty straight forward and can be done in 1 line of code.  I have broken it up into several for clarity.

NSString *url = @"http://brandontreb.com";
NSString *apiEndpoint = [NSString stringWithFormat:@"http://api.tr.im/v1/trim_simple?url=%@",url];
NSString *shortURL = [NSString stringWithContentsOfURL:[NSURL URLWithString:apiEndpoint]
encoding:NSASCIIStringEncoding
error:nil];
NSLog(@"Long: %@ - Short: %@",url,shortURL);
 
// Outputs Long: http://brandontreb.com - Short: http://tr.im/MRDd

Pretty easy huh?

iPad Programming Tutorial – Hello World++

Introduction
Now, that the iPad has been released, I’m sure you are all scrambling for ideas on how to snag a piece of the maket in the imminent gold rush.  iCodeBlog is going to help you on your journey with a series of iPad tutorials to come.
Since the iPad uses the same SDK as the iPhone, all of the code under the hood is almost identical.  Actually, when looking at the new and changed API classes, you will realize that most of them are user interface related.  This is good news for us since we have already been coding iPhone.
While this tutorial is called “Hello World”, it is really much more than that.  I assume you already have working knowledge of iPhone/Objective-C programming.
What We Will Be Creating
In today’s tutorial, I will be showing you how to create an iPad project that uses the UISplitViewController to display content in 2 separate panes.  We will also be touching on some of the new design/UI patterns and giving an overall introduction to iPad programming.
The project will be based on one of my earliest tutorials that displayed a list of fruit in a UITableView and drilled down when they were selected.  We will be expanding on that example and creating something that will look like this.

3.1.3 and thee

WARNING! At 10.30AM PST on February 2nd 2010 Apple released the 3.1.3 version (7E18) of the iPhoneOS.
If you care about your jailbreak and unlock, don’t update your device - 3G and 3G(S) owners should pay particular attention to this warning.

  • PwnageTool and redsn0w are not yet compatible with 3.1.3
  • There is no estimated release time for compatible tools (please don’t bug us about this).
  • Any information we have regarding this update will be posted here.
  • You can also follow us on twitter - @iphone_dev