Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIWebView and Safari comparison

  1. Does UIWebView use the same JavaScript engine as Mobile Safari?

  2. Also, does UIWebView support all HTML5 features like Mobile Safari does? I am specifically concerned about Web SQL and Web Workers

  3. If I have an app which is written purely in HTML and JS, should I wrap it up in a UIWebView or should I have it open in Mobile Safari

  4. Are pure HTML and JS apps accepted on the Apple store?

like image 518
arahant Avatar asked Jul 25 '12 10:07

arahant


People also ask

What is UIWebView Safari?

It means that your web site was viewed using the UIWebView functionality on an iOS device (iPhone, iPad, iPod Touch). The UIWebView is different from the ordinary Safari browser, as it is not a stand-alone browser, but merely browser functionality that is embedded in a third party app.

Can I still use UIWebView?

UIWebView APIs are still supported in the upcoming iOS 13 release as well as macOS Catalina but are still going away in future releases. Sometime in the future, iOS apps may be blocked from release to the App Store when Apple decides to enforce blocking apps that use UIWebView.

Is UIWebView deprecated?

Apple is phasing out UIWebView, which is used by developers for integrating web content into an app in a quick and secure manner. Apple is replacing UIWebView (and WebView) with WKWebView, an updated version, as UIWebView has been deprecated.

Does Safari use WebView?

A WebView uses webkit engine to render html which is what safari also uses.


1 Answers

Does UIWebView use the same JavaScript engine as Mobile Safari?

UIWebView does not have the Nitro Javascript engine, so it executes JS slower than Mobile Safari. So it's not the same.

Also, does UIWebView support all HTML5 features like Mobile Safari does? I am specifically concerned about Web SQL and Web Workers

Not sure about this one. Probably not. At least UIWebView is a bit more strict than Safari on certain features. Example: when setting a width/height style through JS, you need to add 'px' behind the number, while Mobile Safari does not require that.

If I have an app which is written purely in HTML and JS, should I wrap it up in a UIWebView or should I have it open in Mobile Safari

If you want to release the app on the App Store, you will have to wrap it. If not, you don't really have to.

Are pure HTML and JS apps accepted on the Apple store?

If you wrap it, yes. But it has some limitations, as James Webster wrote.

See this question here on SO for more information on the differences between UIWebView and Safari.

like image 148
matsr Avatar answered Oct 02 '22 14:10

matsr