HTML5 mobile app - when to simply use UIWebView and when to use PhoneGap? - ios

I am a web developer who needs to build an HTML5 mobile app - which we will need to try and submit to app stores, including Apple's App store. Therefore, I need to somehow wrap my app into a native framework.
That being said, I don't have time to learn the nitty gritty of Objective-C and figure it all out.
I am trying to decide between using a service like PhoneGap, or simply creating a smaller native app with a webview that pulls up my mobile app from my site's server.
In this case, the only native hardware that my app needs to be in touch with are push notifications (probably through Urban Airship) and Geolocation (which can be accomplished via HTML5).
When is it wise to go with something like PhoneGap vs. simply creating a UIWebView, and vice versa? Which would you suggest in this case?

Apple is loyal enough to PhoneGap apps - almost no problems with approval on iStore. You should just follow Apple Human Guidelines and everything should be OK.
PhoneGap provides lot's of different and interesting features. Also it's cross-platform - works great on iOS, Android, WP7 etc. I think it's the best way to wrap your HTML5 and JS.
Talking about pushes - if you select phonegap, i recommend to look at pushwoosh service.

Related

Technical differences between PWA and Hybrid App

What are the differences between a PWA and a hybrid app? This question was asked before but I haven't found found a proper answer to my question.
I know a PWA runs in the browser and you get a hybrid app from an app store.
But both are using JavaScript with HTML and CSS and both enable offline support and I can access native features like camera and local storage.
Once I have added a PWA to my Homescreen, it uses a web view to render the app right? And a hybrid app uses a web view as well, so what exactly are the differences between PWA and a hybrid app?
With Ionic I can even use the exact same code for a pwa and a hybrid app...
Roughly it is like this below:
web app (PWA) is just a web-site that declares certain capabilities using manifest file etc which can get it some special treatments (like leverage service worker, sign up for web notifications, go full screen etc IF target browser supports it). As a web-app it is super limited in its "privileges" on a system level (like persistence quota etc)
hybrid app (like Cordova for example) is a binary code that is "wrapping" your web-code and exposes certain "native" SDK capabilities via plugins. You can potentially also write your own plugin and in theory access any native SDK API this way. But since your main app code is still a web-app that runs inside of a webview it still has a lot of penalties like performance etc. But at least you can get things like storage etc.
native app is a binary build using target platform's SDK. That in
theory gives you max access to capabilities and performance at
expense of having to write separate code for each platform.
Makes sense?
Progressive Apps
Today, these apps only work on Opera, Chrome, and the Samsung mobile browser. However, these browsers take up only less than half of the mobile browser market.
In some devices, some of the features will not work. For instance, notifications on iOS devices will not work.
In some apps, cameras, fingerprint scanner, and GPS may not work or work with glitches.
Cordova/ Ionic based hybrid apps
Making the hybrid apps run efficiently on multiple platforms is no easy task. In some instances, it could cost almost the same as running native apps. The cost will depend on how close you want to get to the native app experience.
Since these apps will launch using a browser-like component, they are only as good as the component on which they run. Earlier, Google and Apple did not agree on the WebView. While it has vastly been improved, it does not have the same efficiency as running a native app.

Web App accessing iOS camera for QR scanning

For 'check-in' purposes, my staffs have a mobile device (ios and android) that opens my web app through a browser. They then open a page and it allows them to scan a customer's qr code to check them in. I would like it to have as little user interaction as possible. All they staff needs to do is to keep the webapp open, and scan the qr code. The web app will then call an api on my server which check this customer in. So accessing the camera's view is best, i can then run a qr code scanner.
I've been able to do it for android (using getUserMedia) but it doesnt work for ios. (duhhh)
I'm currently using Vue.js(V1), and would like to keep it as it is.
Hybrid Apps: I've looked at OnsenUI(which seems to only work with vue2), Ionic(which doesnt allow me to build/run ios platform as i am using windows).
webapp is coded with vue.js(v1), running on a tomcat7 server, HTML, JS.
Are there any suggestions?
I've found a way to use Phonegap to allow this.
Edit: Phonegap allows you to create a hybrid app that seems like a native app(ios or android). All i did was install phonegap and used one of their plugins (barcodescanner). This is the refrence i used.
But, from my understanding, You'll need to publish the app on the app store, which is a lot of hassle (and cost money).

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.

iOS App: webView or PhoneGap?

We are developing a HTML5 mobile app with Sencha Touch.
Now we want to package the App, and found that we have two methods:
The first one is to use PhoneGap to generate a native app based on our html5 code.
The second one is to create a Single WebView app in Xcode, and request the url which will host our HTML5 code.
I found the second method relatively easier. So are there any advantages in using PhoneGap to generate the native app?
We usually use phonegap/cordova when we need some native function from the device, for example a barcode scanner.
Of course you can create your own barcode project, however why reinvent the wheel. Since phonegap/cordova 3.0 the effort needed for creating a app is kinda low. Just follow the guide and your all set.
http://docs.phonegap.com/en/3.4.0/guide_platforms_ios_index.md.html#iOS%20Platform%20Guide
in short:
Advantages of Phonegap/Cordova
Ready for different platforms, little effort to create android app
Native functionality already implemented (plugins)

Using twilio sdk for an iOS app?

I am planing to develop an VoIP iOS app and use Twilios SDK. I am making the choice to either use LiveCode, Appery.io, PhoneGap or build a native Objective C app. I am going to build the app for iOS, Android and HTML5 so the ideal would be to develope in JavaScript for all platforms, but as I understand the support for WebRTC is laking on the iPhone so the alternative for iOS is the native twilio SDK.
My requirements is:
be possilbe to use in iPhone 5 with iOS 7 be able to use twilio iOS
SDK´s voip functionality or twilio´s js SDK (if it is possible to
wrap a browser that supports RTC in the code?) be able to integrate
billing such as in-app payment or paypal with zooz or similar
communicate with REST API´s such as Amazon S3 or a node.js server
store temporary info in a SQLLite db when app is off line make fast
and responsive views (file listings etc) is very important
create cfuuid´s
I have seen several Twilio projects that use PhoneGap but none that are using LiveCode.
I have already built an iOS VoIP app in Objective C, but I want to be able to release it on several platforms also such as for Android and build a HTML5 app, without redoing everything.
This isn't really a programming question and should perhaps not be asked here.
You can create an external for LiveCode and quickly create an interface using the LiveCode IDE. This is probably a quick and easy way to make a working app. If you're starting with LiveCode but are experienced in Objective-C, creating an external won't be a problem for you.
LiveCode doesn't contain native iOS controls, which means that you have to emulate the GUI. If you use PhoneGap, you also will need to compile a plugin for PhoneGap using Objective-C, but you can use a framework, such as JQuery, to get the right GUI.
Either way, you will have to compile the SDK and you'll need to be quite profound in Objective-C.
LiveCode will meet all your requirements. However, Apple will deny your app if you use PayPal for in-app purchases. You'll have to use Apple's in-app purchasing feature. I believe this is possible in LiveCode now. I'm not sure how easy it is.
I'm not sure about file listings either. On iOS, you won't have complete access to all files on the phone. This isn't a LiveCode limation but a limitation of the OS.

Resources