UIWebView and Safari comparison

帅比萌擦擦* 提交于 2019-12-17 09:43:43

问题


  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?


回答1:


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.




回答2:


I can only really provide insight to part 4 of your question with these snippets:

There are a few guidelines in the App Store Review guidelines (requires login) that mention "web"

2.12 Apps that are not very useful, are simply web sites bundled as apps, or do not provide any lasting entertainment value may be rejected

2.17 Apps that browse the web must use the iOS WebKit framework and WebKit Javascript

12.3 Apps that are simply web clippings, content aggregators, or a collection of links, may be rejected



来源:https://stackoverflow.com/questions/11648184/uiwebview-and-safari-comparison

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!