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

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.

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.

Can I use Ionic Framework to create a mobile optimized website (not just a mobile app)?

I have been doing research to figure out the best way to create a mobile optimized website using Rails variants. I see that Framework 7 does this nicely, but I can't figure out if I can also do this with Ionic Framework? Can I use ionic components to create a mobile website that runs in a plain browser like Safari?
As Ionic works with AngularJS and according that the development process uses a simple http server on the folder /www, you can easily develop a mobile website with Ionic.
You will not have to use Cordova/Ionic plugins. But you'll can use HTML5 API to get geolocation or webcam access, etc.
But it is not because you can that you have to. Give it a try and tell us if you think it was a good idea.

Mobile app framework for mobile and AngularJS for desktop?

Background: I've recently learned Ruby on Rails and have just learned to use JavaScript as well as JQuery. I've created some web apps using both.
Goal: To create a small e-commerce-like site using Rails backend but optimize for mobile. There will be a shopping cart but no built-in payment system.
I've seen these mobile app frameworks like ionic for mobile but am aware that ionic doesn't play nice with internet explorer for the desktop folks.
My idea is to use a mobile app framework like ionic or such for mobile and using a web framework like AngularJS for the desktop users for the same site. Or use a mobile app framework for mobile and no web framework for desktop?
I'm currently not advanced enough in my development skills to create adapters to use ionic or other mobile app frameworks to work friendly with desktop browsers. I'm looking for the more developer convenient route with style and with less configuration.
Please advise your recommendations and if you think that this setup can be done with minimal configuration with Rails as the backend.
Hybrid solutions will always be less good than native, in terms of performance, size and stability.
But Hybrid solutions are improving with time and ionic is a great solution, it avoids you to develop specific app for each platform.
To develop your hybrid app i warmly recommand you to use AngularJS, to me jQuery is not made to develop big application.

Integrate Worklight project in existing IOS project

I have to integrate a Worklight project into my existing IOS project (Objective-C)
I have googled but i have not found a clear "guide" on how to perform this integration.
Could you drive me in the right way of integrating this project? The idea is to have a button in my IOS project that open a WebView that loads the pages (HTML5 and javascript with AngularJS and Jquery) contained into the Worklight project.
Thank you so much
There is no guide for this approach, as I don't think it is sustainable.
In Worklight you currently have two approaches:
A native application to which you add the Worklight Native iOS SDK, allowing you to implement security features, invoke adapters and use various other features
A Hybrid application to which you can add native functionality (via Cordova or otherwise), and use the entire set of features provided by Worklight
It is important to note that a Hybrid application is a native application. It is a fully actual real native app. It is a native shell that calls a webview (provided by Cordova) into which the Worklight JS framework and the application web resources are loaded, and thus you see your web app. A Hybrid application allows you to mix & match web and native in one.
So what I am saying is that you can't take an existing iOS app and transplant it into another existing iOS app.
It sounds to me like what you are essentially trying to do, is what a Hybrid app is. A native app that displays web content...
So:
This is not an approach Worklight officially supports. By doing this, you are on your own
You could maybe take the guts of a Hybrid app's iOS environment (myapp\iphone\native) - its classes and resources and add them into your existing app and load the main class which theoretically, or at least the wanted effect, will load the Cordova webview. But I give this low chances of success...

BlackBerry OS 6 App Dev

When developing a application for iOS that pulls in a web site, you have a very simple web app wrapper that as far as I know acts like an iframe, pulls in the web site and boom - you have an app.
My understanding is that if done this way you are using a "stripped down" Safari to view the web site in a "app" as it is a web wrapper.
When developing an app for BB OS6, is it the same concept? If I develop a wrapper that says "go fetch site x and display it in this app" is it going to use BB OS6 default browser APIs to render said site?
Also is there links to said API?
If all you want is a container to display Web content I'd highly recommend you use Webworks (or cordova for cross platform) as opposed to Java. WebWorks already creates and sets up the bf2 for you in a tested and proven way.
The equivalent of UIWebView for iOS would be the BlackBerry BrowserField.
If you want some examples of how to use it, I recommend installing the BlackBerry Eclipse plugin. That will install in Eclipse the full BlackBerry Java SDK (e.g. version 6.0, 7.0, etc.), which comes with lots of sample code. From Eclipse, you can then
Import... -> BlackBerry -> Import BlackBerry Samples -> BrowserField2Demo.
Note that you want the BrowserField2Demo, not BrowserFieldDemo!
Or, you can go directly to the github site with BlackBerry sample code.

Resources