Wednesday, January 14, 2009

New iPhone App Store Rules Take a Step Closer to Scriptable Apps

A lot of folks commented today on newly-approved web browsers appearing in the App Store. Or, more precisely, a handful of apps using the existing web browser widget to offer a slightly tweaked browser experience.

While iPhone apps could include the UIWebView component before -- and indeed this has proven a popular route to getting hybrid native/web apps up and running quickly -- today's change is about allowing apps that "duplicate" a built-in feature of the phone. And one of the fundamental characteristics of any web browser nowadays is that it is thoroughly scriptable.

If you build an app this way, it already includes a scripting environment ... so the question (since scripting and dynamic apps are verboten on un-jailbroken iPhones) is how far one can let the scripting go and still pass muster with the App Store overlords.

Using stringByEvaluatingJavaScriptFromString we can inject script into the browser ... including script that pulls data back out.

And although the JavaScript bridge is "one directional" compared to the OSX desktop API, there are workarounds such as registering a protocol handler to receive scripted "requests" from inside the page ... or by hooking decidePolicyForNavigationAction with a script-initiated navigation request (disclaimer: I haven't checked to see if this is in the phone API, but it seems plausible) to signal the availability of data.

So native code becomes effectively scriptable. Or, for an even less controversial but perhaps equally powerful route: just inject a bunch of JavaScript API libraries into the browser and keep the scripting (and more of your app) in Safari. That's not too different from pointing a browser at a web site (where the page loads various scripting libraries) ... except that underneath it all we are in native-caps mode ...

Unless I'm missing something here, a somewhat ambiguous situation has gotten thornier with the admission of this new class of general purpose browser apps.

4 comments:

Anonymous said...

burberry polo shirt
ed hardy clothes
Wholesale Handbags
babolat aeropro drive
cheap tennis racquets
cheap jacket
Puma basket
Cheap puma shoes
burbrery polos
ed hardy shirts

Anonymous said...


Probably have the pooch really being captured having most liked dog toys item, even as various other basic shots are classified as the sorts the things which customers prefer decide on fro k-9s which have been revealed.

You know provided by come upon that it must be don't often very easy to just take imagery from most dogs. When dog breeds usually are slack coupled with dog products online docile, others are really quite super and do not stick to details. In the form of lucrative canine become expert, you have to be able to uncover canines from your setting dog collar that their holder would love for getting a picture.

Anonymous said...

Sunglasses for ladies need to make typically sunglasses fashion the consumers have a look special along with fun-filled. And finally, it is essential that eyeglasses for girls have to have some specific attention. Whereas we say that in order to be well-known by way of people fashion eyeglasses from children which can prior person is truly expensive, drinking glasses for ladies can't wind up being unheard. Women desire fair pride, since are sometimes a very useful desire in general.

Around the, these three properties usually are my glasseseshop.com personal trivial understading about sunglasses for women.

Godness said...

That's the best ever!! ecstasygames001
ecstasygames002 |
ecstasygames003 |
ecstasygames004 |
ecstasygames005