UIWebView and Safari comparison - ios

Does UIWebView use the same JavaScript engine as Mobile Safari?
Also, does UIWebView support all HTML5 features like Mobile Safari does? I am specifically concerned about Web SQL and Web Workers
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
Are pure HTML and JS apps accepted on the Apple store?

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.

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

Related

What does Apple think about complete Web Based Apps?

I used to be a Web Developer and I'm not experienced at developing iOS Apps.
I've just found out that I can make the whole App a Mobile Website. So my question is if Apple accept these kind of Apps, where the whole content is a normal mobile friendly Website. As Apple can't control the content displayed in such an App.
There are three ways you can leverage your expertise as a web developer to develop iOS apps:
Use SFWebView or WKWebView and use it to present HTML (either stored or retrieved remotely) to the user. In this case your app would have to go through AppStore review. There's plenty of apps like these, so I would assume it would not be a huge issue.
Use a framework like React Native that compiles Javascript dialects into native UIKit. Again, the app would be up for review in the AppStore. It would feel more iOS-like to the users.
Develop a bona-fide web app that looks great on any phone and you skip the AppStore part.
I'm working as a web developer too and we did a few iOS apps for our clients. Basically 90% or more where pure web view and so far we didn't had problems getting through with them.

Do the Facebook and Twitter mobile apps use the Safari browser?

Apps on iOS or Android devices, do the built-in browsers (like the Facebook & Twitter app) use the OS's browser or do the apps use their own? For instance, if my iOS's main browser is Safari, is it then also used by the apps?
Thanks!
In iOS I think they use the UIWebView class to display a generic web content.
There are also frameworks that allow an application to navigate the web but I don't think they're correlate in any way with Safari.
For the Android part, I guess it's the same..
No. The apps use their own.....

Mobile Safari uses Webkit1/Webkit2?

I am researching a bit about Mobile safari and have searched the web for any information about the process model being used.
Webkit1 was a single process framework and with Webkit2 the chromium style multi-process model was introduced in Webkit. But no where is there a mention of Mobile Safari using the same.
Is there anyway to detect which Webkit(1/2) is being used in the latest Mobile Safari? Is there any changelog of the same?
I'm not sure in my answer, but there is a private framework called WebKit2.framework in iOS7. You can check it here.
So, it's quite possible, that Safari uses WebKit2.

Is PhoneGap only for NativeApplications or for remote web app HTML pages too?

I am new to PhoneGap I want to know whether PhoneGap is only for Native Applications or for remote web app HTML pages too. Please any one answer me.
Thank you Lakshmi
Phonegap! enables software programmers to build applications for mobile devices using JavaScript, HTML5 and CSS3, instead of lower-level languages such as Objective-C/core-java. The resulting applications are hybrid, meaning that they are neither truly native (all layout rendering is done via the webview instead of the platform's native UI framework) nor purely web based (they are not just web apps but packed for appstore distribution, and have access to part of the device application programming interface). You can try Sencha, Ext-JS HTML5! frameworks to create remote web app HTML pages.
Phonegap! enables a web developer access to mobile devices's phonebook, Geolocation, compass, accelerometer,etc.(A browser is not exposed to these APIs')
Appcelerator Titanium! is another platform for developing mobile, tablet and desktop applications using web technologies.
PhoneGap can be used on webapps too, if loaded through PhoneGap. It won't work in mobile safari directly, you must also open the site via PhoneGap (the app on iDevices)
The power of Phonegap is that you can build apps with web technologies and then package them to install as native apps from the app stores. To the user there is no differentiation between a pure native app and a phonegap app. The average user just sees an "app" that they are used to. If you're going to build a vanilla mobile website, you won't have access to the native libraries which is what Phonegap is intended to leverage.

Single Page Web Apps for the iPad?

I'm looking to make a single-page web app that works exclusively on the iPad, like Gmail on the iPad and the iPad User Guide. An app like this must be made using a framework that allow web pages to behave in ways much more akin to iPad's native applications (momentum scrolling, split-view panes, UIKit-style interface), but done completely in HTML5, CSS3, and JavaScript (with WebKit and Safari extensions like iOS-specific multi-touch and gesture events).
The only public framework I've found that targets the iPad in this matter is Sencha Touch. Naturally, Google and Apple aren't sharing the libraries they've written (ie. PastryKit, AdLib, etc). Are there any others (the open-source only license for Sencha Touch is prohibitive, and jQTouch is only for small-screen devices like the iPhone 4, and not the iPad)? How would I go about writing momentum scrolling and split-view panes like this? Any good resources/tutorials/books/links on these advanced topics?
For a lot of reasons, people want to write web apps for the iPad that can compete with native.
I don't think you'd have to do it yourself. The sencha touch commercial license is free, so you won't have to open up your own code. On the iPad it looks really good.
You can also use PhoneGap to put a native wrapper around it so most users won't notice it's a web app.
Jquery mobile is also an option but it doesn't look as good as sencha, IMHO
Sencha Touch license
PhoneGap
Also checkout App Titanium... You develop in Javascript, but it renders your app as native code...
Take a look at SproutCore and:
http://blog.sproutcore.com/post/531215199/introducing-sproutcore-touch
http://touch.sproutcore.com/hedwig/
http://www.npr.org/webapp

Resources