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.

13 comments:

huyuni said...

China Wholesale has been described as the world’s factory. This phenomenom is typified by the rise of buy products wholesalebusiness. Incredible range of products available with wholesale from china“Low Price and High Quality” not only reaches directly to their target clients worldwide but also ensures that China Wholesalers from China means margins you cannot find elsewhere and China Wholesale will skyroket your profits.

huyuni said...

Thank you so much!!cheap polo shirts men'ssweate,Burberry Polo Shirts lacoste sweater, ralph lauren Columbia Jackets,ski clothing. Free Shipping, PayPal Payment. Enjoy your shopping experience on mensclothingus.com.You can find the father who desire fashionable, intellectual mens clothing simultaneouslyGod bless you!I really agree with your opinions.Also,there are some new fashion things here,gillette razor blades.gillette mach3 razor bladesfor men.As for ladies,gillette venus razor blades must the best gift for you in summer,gillette fusion blades are all the best choice for you.Fantastic!God bless you!Meanwhile,you can visit my ,we have the highest quality but the lowest price fashion products wholesale from China.Here are the most popular China Wholesale products for all of you.You can visit .Also the is a great choice for you.

huyuni said...

nike shoes & Puma Shoes Online- tn nike,puma shoes,puma cat, baskets cheap nike shox, air max.cheap nike shox r4 torch, cheap nike air, nike running shoes air max, puma speed and more. Paypal payment.nike running shoes Enjoy your shopping experience on Nike & Puma Shoes Online Store.

huyuni said...

Lacoste Polo Shirts, , Burberry Polo Shirts.wholesale Lacoste polo shirts and cheap polo shirtswith great price. clothingol.com offers lot of 10ralph lauren polo lacoste polo shirts and lot of 20 Burberry Polo Shirts. clothingol.com offers classic fit polo shirts. polo clothingCheap Brand Jeans ShopMen Jeans - True Religion Jeans, burberry polo shirtsGUCCI Jeans, Levi's Jeans, D&G Jeans, RED MONKEY Jeans, Cheap JeansArmani Jeans, Diesel Jeans, Ed hardy Jeans, Evisu Jeans, Women JeansJack&Jones Jeans...

huyuni said...

Charlestoncheap columbia jackets. turned a pair of double plays to do the trick. spyder jacketsThe had at least one runner on in every inning but the first and outhit the RiverDogs by a 12-6 margin Lawal should be a focal point of the Yellow cheap polo shirts along with highly touted newcomer, 6-9 Derrick Favors, rated as the No. 1 power forward on the ESPNU 100. The Yellow JacketsThere are ed hardy shirts pretty ed hardy shirt for men,
ed hardy womens in the ed hardy online storedesigned by ed hardy ,many cheap ed hardy shirt ,glasses,caps,trouers ed hardy shirts on sale ,You can go to edhardyshirts.com to have a look ,you may find one of ed hardy clothing fit

j 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...

出会いカフェ北海道出会いカフェ岩手出会いカフェ宮城出会いカフェ秋田出会いカフェ

gaohui said...

The holidays are a time ed hardy of getting together with friends ed hardy shoes and family, attending elaborate ed hardy clothing parties, and other exciting events ed hardy clothes that involves dressing up in stunning ed hardy store wardrobes. If you ed hardy Bikini are pregnant during ed hardy swimsuits the holidays, it does not ed hardy Caps mean that you are unable buy ed hardy to look fabulous and ed hardy swimwear stylish. Now, an expectant ed hardy sale mother has many styles of chic ed hardy glasses maternity clothing that allows cheap ed hardy her to show off her baby bump Christian audigier while looking spectacular.

Jack said...

I came across a nice quote while re-reading Randall Gould's great China memoir China in the Sun the other day. Gould was a veteran member of the old China press corps before the war.

cheap wow gold|Tera account|Tera gold|buy eden gold|wow gold

Anonymous said...

I came across a nice quote while re-reading Randall Gould's great China memoir China in the Sun the other day. Gould was a veteran member of the old China press corps before the war.

the cambridge satchel|satchel cambridge|cambridge satchel|cambridge satchel co|the cambridge satchel company|cambridge satchel bag|cambridge satchel company bag|cambridge leather satchel|cheap uggs

Anonymous said...

Digital Cops in a Virtual Environment. Today The Information Society Project at Yale Law School (of which I am the director) begins its three day conference on Cheap Soccer Shirts | Cheap Football Shirts | henry 12 arsenal jersey | messi jersey 10 argentina | fabregas jersey arsenal | david villa barcelona youth jersey | benzema soccer jerseys | cristiano ronaldo real madrid jersey | cheap rooney soccer jerseys | kaka soccer jersey | real madrid shirt | new fc barcelona jersey | argentina jersey 2012 | Brazil jerseys wholesale | cameroon jerseys wholesale | england jerseys sale

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.