Archive for 'Mobile Safari'

Tutorial: HTML5 iPhone App

Here’s another one in our dribble of  occasional mentions of the offline HTML5 alternative to building iPhone applications, just in case we ever have a problem with App Store restrictions or the need for a cross-mobile-platform deliverable enough to actually get into it:

How to Make an HTML5 iPhone App

… I’ll show you how to create an offline HTML5 iPhone application. More specifically, I’ll walk you through the process of building a Tetris game.

What am I talking about when I say “offline”? Well, it means that we have a custom icon, a custom startup screen, a native look-and-feel, and you can use the app even when the phone isn’t connected to the Internet.

The app should be as functional as it can when it is offline, just like normal native mobile apps.

This is a tutorial specifically for iPhones but most of these techniques apply to all phones that have HTML5-capable browsers…

Thorough walkthrough, easy to follow, covers offline data storage even. Good stuff, good stuff!

h/t: MobileOrchard!

Continue Reading →
1

App Website Template

Oooh, this is just the thing for those with the artistic ability of trolls: an attribution-licensed complete website for an iPhone application!

appwebsitetemplate.png

Not only that, full documentation here. Good stuff, good stuff.

And if you want WordPress support or the source .psd files, here is the commercial version!

h/t: iPhoneSDK!

Continue Reading →
1

Website Snippets

Here from the awesomely-named Cats Who Code blog is an article of 10+ Useful Code Snippets To Develop IPhone Friendly Websites — some of which are interesting for use in your UIWebView-presented embedded content as well, looks like:

  • Detect iPhones and iPods using Javascript
  • Detect iPhones and iPods using PHP
  • Set iPhone width as the viewport
  • Insert an iPhone specific icon
  • Prevent Safari from adjusting text size on rotate
  • Detect iPhone orientation
  • Apply CSS styles to iPhones/iPods only
  • Automatically re-size images for iPhones
  • Hide toolbar by default
  • Make use of special links
  • Simulate :hover pseudo class

The blog looks pretty interesting in general if you’re into HTML, WordPress, etc. at all. Which, yeah, we will be one of these days, at least to find a theme that’s actually readable to save our Gracious Readers’ eyes. Just as soon as things slow down just a smidgen. 2018 is looking not bad. So far…

Continue Reading →
0

Selling Bookmarklets

Now this is an intriguing twist on the App Store discussed over here at Mobile Orchard: Let’s say you’ve written a clever piece of JavaScript to extend Mobile Safari, like for instance

So, instead of writing a complete Safari replacement to add the missing Find In Page capability, you write JavaScript to take the search term and then find it in the page. Add that JavaScript as a bookmark and you’re all set.

Now, let’s say you feel like monetizing that. Through the App Store. The App Store? Why yes, through the App Store!

Vais’ twist is this: he’s selling his bookmarklet in the App Store for $0.99. His angle is clever: he’s created a simple app that places the bookmarklet JavaScript on the pasteboard. The user can then add a bookmark and set its location by pasting the JavaScript…

Now that’s a cool idea. Wouldn’t have occurred to us that Apple allows such a thing, but the proof is in the pudding. Where by “the pudding” we mean “the App Store”, of course. So there you go, if you have some clever browser extension code, now you know how to monetize it!

Continue Reading →
0

Building HTML Apps

So we’ve mentioned favorably before that using HTML5 to build iPhone apps is an interesting looking alternative, but there’s been a dearth of public information targeted specifically at that. Well, now there is! Over at O’Reilly Labs they’ve published

Building iPhone Apps with HTML, CSS, and JavaScript

Now web designers and developers can join the iPhone app party without having to learn Cocoa’s Objective-C programming language. It’s true: You can write iPhone apps quickly and efficiently using your existing skills with HTML, CSS, and JavaScript. This book shows you how with lots of detailed examples, step-by-step instructions, and hands-on exercises.

  • Learn how to build iPhone apps with standard web tools
  • Refactor a traditional website into an iPhone web app
  • Hook into advanced iPhone features (e.g. accelerometer, geolocation, vibration, and sound) with JavaScript
  • Do most of your development with the operating system of your choice

Yes, we’ve definitely got that on the reading list. Just as soon as there’s a spare minute around here…

h/t: DZone!

Continue Reading →
1

HTML5 Intro

So you’ve no doubt noticed references here and there to the nifty new HTML5 stuff that’s working its way out into the world, but there’s been a positive dearth of good introductions out there, as opposed to snippets trickling out here and there; well, here’s a good start on sorting that from our friends at Google:

Video Introduction to HTML5

We’ve put together an educational Introduction to HTML 5 video that goes over many of the major aspects of this new standard, including:

  • Web vector graphics with the Canvas tag and Scalable Vector Graphics (SVG)
  • The Geolocation API
  • HTML 5 Video
  • The HTML 5 Database and Application Cache
  • Web workers

In the video we also crack open the HTML 5 YouTube Video prototype to show you some of the new HTML 5 tags, such as nav, article, etc. It’s chock full of demos and sample source code.

Well worth the watch. Especially in light of the news that Google is going to drag Internet Explorer users kicking and screaming into the current millennium by, essentially, delivering WebKit as an IE plugin. They must be feeling pretty nervous down in Redmond these days!

[EDIT: And here's another link-laden HTML5 overview worth checking out!]

Continue Reading →
1

Library: jQTouch Beta

And a little something for our web developer friends today: if you’re into jQuery — and seems everybody is, these days — there’s a plugin called jQTouch for your mobile WebKit programming needs, and sounds like the new beta version is indeed all that and a ham sandwich:

Just wanted to let everyone know I just released a new beta for jQTouch — a jQuery plugin for mobile development, similar to iUI. The new beta has a ton of features like native animations, event callbacks (including swipe detection), and a ton of shortcuts for creating fullscreen apps.

Pretty impressively updated from our first mention back in March … enough we figure to merit a reminder in case you weren’t bowled over back then!

h/t: iPhoneWebDev!

Continue Reading →
0

App Store Alternatives

So as an established iPhone developer, no doubt you’ve had your share of frustrations with the App Store and its approval process. Or maybe you just don’t like giving Apple it’s 30% cut. Or the … challenged … reports and payment process. What to do? What to do?

Well, there’s always the jailbreak crowd, we suppose — and they have indeed listed almost two dozen apps now! — but call us crazy, we just kinda tend to assume that the somewhere around 8% of the crowd that jailbreaks their phones in the first place are not heavy spenders on software, if you know what we mean and we think you do. If you have any evidence that the people listing Cydia apps are making a buck off it, let us know; but we’re just going to assume that it’s not so.

That doesn’t leave anything, does it? Well, according to Dow Jones, the people at Hottrix have sussed out something:

SAN FRANCISCO -(Dow Jones)- Steve Sheraton has a new magic trick: He’s making Apple Inc.’s (AAPL) App Store disappear.

The magician turned App developer has begun selling his $4.99 “iHypno” mind- reading application for Apple iPhones and iPod Touches directly from his Web site. That means consumers can buy the program without visiting the App Store, the official software bazaar that operates under Apple’s iTunes store.

“It’s based on technology encouraged by Apple,” Sheraton said during an email interview. “It’s totally legal and possibly the way you’ll see other apps delivered in a year or so.”…

Intriguing, yes? We thought so when it came up in this thread on iphonesb. The consensus was that they were using HTML 5 features — specifically the offline application cache — and CSS 3 visual effects which are hardware accelerated on the iPhone and all to provide an application-like experience which was essentially just a Web bookmark far as the phone was concerned.

So, in our never-ending quest to inform and entertain you the Gentle Reader, we decided we’d invest the big five bucks in checking out just how acceptable the experience actually is. So off to the site we went, picked an application, paid through a pretty standard credit card web purchase interface, and in short order got the email

Hi there Alex Curylo,
Thanks for purchasing MindBeam!
Please find below instructions to get up and running with MindBeam in no time. Be sure to practice before performing.DOWNLOAD HERE:**************************************Here are the files you will download to your iPhone/iPod touch (not your computer).Open this email on your iPhone or iPod touch.Personal download link on iPhone: http://is.gd/XXXXXPlease keep the link to yourself because it is tied to your payment information.The link will not work on your home PC, just on your iPhone or iPod touch.

OK then. So we tap on the link on the iPhone, and up comes in Safari

HottrixActivate.PNG
So we do, and after a shortish download we get

HottrixInstall.PNG

Heh. Well, that certainly does confirm the general consensus that these “applications” are cached websites, indeed. But are they actually comparable to native apps?

Why yes, indeed, so they are! Our new MindBeam “application” has animation, device rotation detection, native alerts, and so forth … seriously, it’s more polished and functional than a lot of native apps we’ve seen. There’s nothing that we see that jars the illusion. What’s really interesting is that when you tap the “More Tricks” button that takes you to their website, it looks just like the “application” is quitting and Safari is launching. So either these offline web apps really are run as separate processes, or they’re doing the quit-zoom animation themselves and then letting the standard UI come up. But there certainly is no indication that your “application” is running in Safari — if, indeed, it actually is — or in any way other not acting just exactly like every other native app.

So! That was a most illuminating little experiment, wasn’t it? Apparently it is possible to put together a completely under your control shopping experience for the iPhone that is close enough to providing a native application so that our eagle-eyed vigilance didn’t notice anything jarring, at least not once we got past the bookmarking “install” and into the “application” itself, and we do assure you we were looking.

And the really intriguing thing is, an application developed this way would almost certainly be marketable in the same fashion to Palm Pre users, Android users, and anybody else who uses WebKit or anything else HTML 5 compliant. Sure, they’re probably trivially easy to pirate, but really, what isn’t? Personally, we figure that “display the registered user’s name prominently at startup” is as much copy protection as you need to keep honest people honest, and you can’t keep any other kind honest no matter how much you work at it instead of doing something useful.

So, to sum up, mad props to Hottrix for showing us how to work around the App Store whilst providing what appears to be a perfectly acceptable user experience … and we are definitely going to add to the to-do list getting up to speed on just exactly what classes of application functionality are practical to provide in HTML 5!

Continue Reading →
4

Library: geo-location-javascript

Here’s a library of interest to our web-developing friends; geo-location-javascript, which wraps a number of different device’s GPS capabilities into a JavaScript API that is “aligned” to the W3 Geolocation API specification:

Usage Scenario

The framework provides two key methods, it determines if the handset has client side geo location capabilities and one method to retrieve the location (of course only after a request for permission). So a mobile web site that provides location based services can first determine if the client has client side geo capabilites and ask him to assist him in finding his location. If no geo capabilities are given or they are disabled the site can fallback on a manual location input method and use a geodata database/service to map the input to a pair of latitude/longitude coordinates.

Supported platforms

  • iPhone OS 3.x
  • Browsers with Google Gears support (Android, Windows Mobile)
  • Blackberry Devices (8820, 9000,…)
  • Nokia Web Run-Time (Nokia N97,…)
  • webOS Application Platform (Palm Pre)
  • Torch Mobile Iris Browse
  • Mozilla Geode

A comprehensive — nay, well-nigh exhaustive — list of platforms indeed!

As a side note, if you’re unfortunate enough to be stuck on a Windows platform and would like to have an iPhone (and Pre, and …) emulator to test out your webpages, there’s this MobiOne thing which looks like it could be useful for you, check it out.

h/t: iPhoneWebDev!

Continue Reading →
3

Tutorial: Migrating Data

Here’s another good tutorial at MobileOrchard — my, they are on a run lately, aren’t they? — Lite To Paid iPhone Application Data Migrations With Custom URL Handlers.

Apple enforces a number of restrictions on applications in the App Store. Among the most painful is the lack of feature-limited trials. Applications are either completely free, or the customer must pay up front, sight unseen. The proliferation of “Lite” applications is a direct result of this shortcoming…

When building a game or other stateless application the approach makes complete sense. However, utility applications often maintain information entered by the device owner. Application authors are faced with a dilemma because the iPhone’s security sandbox prevents one application from reading another application’s files. Thus, when customers upgrade from the Lite application they are penalized by having to re-enter all data!

This is rather apropos, as we’ve been already planning something along these lines for migrating data from paid for 2.0 applications to new StoreKit-using 3.o applications, which is more or less the same basic problem as the Lite-to-Pro style migration they have in mind.

The tutorial goes on into exhaustive detail, but the basic idea is to use URL handlers for IPC between your application versions as we’ve mentioned earlier. We do have one additional tip to add though; they focus on using solely the URL itself to transfer data, which there’s a good chance to be problems with using for data in the dozens of megabytes like we need to do. Luckily, we have another earlier post of ours to point you at what looks like a fruitful avenue of inquiry; figure out where UIImagePickerController writes its photographs, which it seems is and is likely to continue to be necessarily a shared access folder, and stick your large temporary data in there. We’ll let you know how that works out once we’ve tried it!

Continue Reading →
15
Page 2 of 6 12345...»