How to Make an HTML5 iPhone App
sixrevisions.com
sixrevisions.com
It converts between track and field performances and awarded points by the Dutch athletics competition. The conversions can be stored. Intended usage is on the field during competition day, or just for the curious.
Source: http://svn.vermaat.name/competitie-rekending/
Originally I also used a manifest file for caching, but decided I didn't need it (and Firefox popups warnings with it). (The manifest is still used in SVN rev 20.)
The biggest problem I encountered on the iPhone (and have not been able to solve) is that whenever you switch apps and return, Mobile Safari reloads the page (online, or from cache) and does so using the original url. There seems to be no way to stop this.
For me that meant that stored conversions where lost (they were stored in the DOM and url), so I had to store them explicitely using localStorage. And still then, it is annoying you have to wait a few seconds for the page to reload before you can do anything.
The only info I found on this problem suggested that it might be related to Mobile Safari's memory management and as such wouldn't occur (as often) on iPhones with more memory than the one I tested with.
I've been doing some beginner tutorials as well: http://www.mobilehtml5.com
Also, my startup (http://www.appstorehq.com) provides search+discovery for mobile apps, including mobile web apps. We're trying to push the boundaries with mobile web apps (e.g. easy, App Store style payments) and are looking for alpha testers.. If anyone is interested, email me: iseff@appstorehq.com
It's a cool way to get an app up-and-running quickly without having to consider the App Store process and while it does abstract you a bit from the straight coding, it's all still done with HTML, CSS and Javascript so if you're already a web developer and not interested in learning Objective-C it's a nice tool to build something quickly.
I've developed several "native" iPhone apps but went this way for one project because we could do everything they wanted to do in a web app and it was simply faster to get there than if we did a native app.
Definitely one of the most overlooked options out there.
I personally prefer Javascript to Objective-C, but HTML, CSS and Javascript are not easier to learn than Cocoa and Objective-C. Objective-C and Cocoa are very will designed, simple tools.
I picked up phonegap and had my first app on the store in a week of spare time. But then I rewrote it with Titanium because it was kind of slow, which took at most another day.
It felt like Christmas, and I found iPhone skillz under the tree.
But now I want in-app-purchase, so I'm learning Obj-C... so the above was all for nothing.
Cocoa is also much simpler than the mess that is building applications using HTML, CSS and the DOM. It was designed specifically for the purpose that is used for, unlike web applications.
JS, HTML, CSS, require a brower, and a text-editor. I don't see many people building iPhone apps outside of xcode. And that stack seems to work well, but when a person who spends a lot of time with the browser model of development, try the xcode way of development, there can be a shock sometimes. Its a metaphore change, that can sometimes be hard to wrap your mind around.
I also think it goes both ways.
I would also argue that your premise that HTML, CSS, and JS were not designed for web applications, is invalid, because we can't just look at technologies for what they were suppose to be used for.
Plenty of stuff has been developed for one thing, but ended up doing another.
If anyone else hasn't made an HTML5 iPhone app or any web app for that matter before and got lost at this part:
"Then, next step is to server it from an actual webserver that can set the proper settings on the cache.manifest"
then maybe I'm not alone? I'm assuming I just read it wrong and it means you can use the same webserver you are using to host your blog, website, etc.?
And then, I was curious how you get the icon on the iPhone home screen which I found the answer here after a quick goog search: http://italkmagazine.com/how-use-iphone-itouch-web-app
(edit) I do have one more question to add for all you crazy iPhone app and maybe Palm app developers out there: 1. Is there an straight-forward way to do this method and then use iPhone developer apps to bring it in and export it to then distribute via iTunes App Store? 2. Same question about Palm.
I wrote a blog post a while back that talks about how browsers handle the manifest files. Forgive the shameless self-promotion, but it might be interesting background reading: http://bit.ly/9WhsO8
Basically, the manifest file is just a special text file that stores a list of the things you want the client to cache. This is the feature of HTML5 that enables offline access to web resources. Think of it as sort of a robots.txt for caching purposes.
http://www.whatwg.org/specs/web-apps/current-work/multipage/...
http://edwardbenson.com/how-safari-and-firefox-handle-html-5...
Apologies if I breached HN Etiquette. I'll post full URLs in the future.
For iPhone it's dead simple to turn an HTML5 app into a native app to get into the app store (see Bank of America's banking app which is HTML versus Citibank's app which is native). There are even kits to help with that: http://www.tuaw.com/2009/05/27/nimblekit-native-iphone-apps-...
The point of an HTML5 app is that (a) you can use DHTML+JS to develop it, and (b) you can bypass the app store to deliver it.
Currently sucking it up and learning ObjC
Keep at it. I seriously dove into it about three months ago. Objective C/Cocoa is no longer the problem, it's the solution. Don't worry if the code you write sucks when you look back at it (e.g. no categories, protocols, NSNotification use). Interface Builder has a thick skin; curse at it. Part of learning this is learning the non-optimal way first. You'll grow into it. The best part of Cocoa/Objective C is how well it was designed. Highly recommend "Cocoa Design Patterns".
http://www.amazon.com/iPhone-SDK-Development-Pragmatic-Progr...
Will def check out Cocoa Design Patterns when I get a chance.
http://news.ycombinator.com/item?id=1220306
Thank-you :)