I have an angular 7 project deployment which runs fine on apache. I like to
use it on android app. After some study, a server like cordova is necessary
for android platform. nativescript is also an option. I really like not to
have cordova bundled in android app. Is it true that I can not use angular 7
deployment directly on webview app? I have several app run on angularjs 1.x which
is working great.
any comment would be appreciated.
Cordova is NOT needed and you can easily use your Angular deployment inside the webview of
android/iOS app.
Cordova is not a server, but it provides the below
CLI to create and manage android/iOS projects and also generate the apk/ipa (app binary). So, with your angular depoyment, you can generate both iOS and android app with single CLI.
These created projects uses webview internally, so all your HTML resources are rendered inside webview.
Plugins interface to communicate with native modules. There are plugins available for automated codepush too.
Finally, if you can maintain your android/iOS app yourself, and all you want is just rendering your HTML app inside webview, you do not need Cordova.
Related
I'm working with a client who's considering migrating their existing MobileFirst Platform 7.1 hybrid app to the Cordova app type.
They are trying to understand if this app type would still give them access to MobileFirst APIs such as WL.App.sendActionToNative to easily bridge the native and JS layers. The list of supported and unsupported features doesn't mention those APIs; are they supported in Cordova-type apps?
Well...
In a Hybrid app one of the benefits of Worklight was that "we" own the native and web portion. You could create a Cordova plug-in (based on the tutorials) if you wanted, but with SendActionToNative - because we own both sides - helped here by "bridging" the two ends, "negating" the need for a Cordova plug-in. This feature is a "Cordova plug-in" in itself(!) internally.
In a "pure" Cordova apps we don't own both ends. Only the web end... The MFP SDK is now a Cordova plug-in.
Anyway, yes, you could enter the platform folder where the native code is and use those APIs and it should work, but in a Cordova world that does not make much sense - you're not supposed to touch any native code... you're supposed to use Cordova plug-ins in order to interactive with the native later...
We are currently considering building an app for iOS and Android using Angular Material.
Having worked with Ionic before, I really like the out-of-the-box dev tools it provides (easy Crosswalk integration, preview server, etc). Is it possible to still make use of those to build and deploy the project (as if we were working with a standard Ionic project), without actually including any Ionic JS or CSS components in the code itself?
Ionic ties in to Crosswalk through Cordova.
The Ionic CLI offers a lot of tools to make working with Cordova easier so it is worth keeping Ionic around even if you don't want the templates.
You can easily get the benefits of Ionic like Cordova and Livereload without the Ionic JS and CSS by installing an Ionic app like normal and just removing the CSS and JS requirements from your HTML.
You can then use Bootstrap, Foundation, or nothing at all.
Ionic as a CLI and framework offers a lot of power, but ultimately it just creates a static web app with plain old HTML, CSS, and JS. There's nothing magical about it.
I am newbie in mobile development and I try to run instances locally.
I try to understand how native frameworks work.
I found phonegap as a native framework. If I go to their site in order to download it I can download the latest version.
However also I found the apache cordova which is the same with phonegap?
What are the difference and which one I can use?
I doubt your inferences.
Phonegap is a framework that allows you to code mobile apps using languages commonly know for web development (HTML, CSS, JS, Jquery etc).
Apache Cordova is the engine that renders this source code to app format application file with file extensions that runs for Andriod or iOS or other platforms.
So you can have one source code and generate apps for every platform.
You need both Phonegap and Apache Cordova for this.
I have a Sencha application which i use to create iOS and Android apps. I have tried cordova but dont really understand why people prefer phonegap over cordova.
Enlightenment needed
The main reason to prefer phonegap is if you want to use phonegap build.
Project built using phonegap cli generates a config.xml using a different shema to handle specific PG build extensions.
Other benefit of phonegap can be if you want to use the Phonegap developer app (it may have changed but at the begining at least, it was supported only by the phonegap cli).
And there are also people using phonegap because at the begining there was only phonegap (before phonegap was renamed cordova) and most people continue to use the name phonegap for all cordova/phonegap stuffs.
I have created an ios app using Xcode .Now I have to make it run on android also.So I downloaded phonegap 2.0 and create an xcode project using commandLine(./create ~/Desktop/newfolder com.companyname.projectname projectname).After that I added all the required classes and storyboard file of allready created ios project to this new one(created by using Phonegap utilities).
And now I can run this project.What I want to know is ,
Is this the correct way to make my ios app cross platform?
Is there any rule that only app created using CSS html5 and
javascript can be made crossplatform using Phonegap?
If my steps are wrong do I need to create the same project using CSS html5 and javascript again for making it cross platform.
You can't achieve such functionality using PhoneGap, here is the wikipage for PhoneGap
It says that it enables software programmers to build applications for mobile devices using JavaScript, HTML5, and CSS.
PhoneGap has different builds for different architectures, so once you've written your entire app using HTML5, CSS and JavaScript you can make build for every different platform available.
If you want to port iOS project into android it is not possible but if you want to port a HTML5 application you can do it using PhoneGap.
Create a PhoneGap project for android using command-line interface. Have a look at the Cordova Command-Line Interface.
Add the CSS, Javascript, HTML, image files inside respective folders. Also, add plugins required for the application using the command-line interface.
Hope it helps you.
First off the bat, if you're looking to port an existing Objective-C based iOS project then it is not possible to do so with PhoneGap.
PhoneGap or Apache Cordova as it is known now is not the only framework that can be used to write cross platform apps. I personally think it is one of the more well supported ones (being an open platform) and yes it is based on familiar web technologies i.e. HTML + CSS + Javascript and you are limited to using only this combination but then web frameworks are good enough for most development requirements these days. This is a good place to start off with Cordova development.
Cordova 3.x.x onward has matured well as a framework and post creation of a project one can add platforms using the command line interface (CLI). This is the common structure of a Cordova project :
/hooks /merges /platforms /plugins /www config.xml
The /www folder contains the web app that you're developing, typically :
/img /css /js index.html
The /platforms folder contains the projects for the various platforms that you've requested, typically :
/android /ios
It is these folders that contain the projects that need to be imported by the IDE that you're using. Say, for Android, import the contents of the android folder as an Existing Android Code Into WorkSpace and build it normally as an Android project. That is all.
Nonetheless, it has many limitations like the lack of support for in app billing, 3D graphics etc. I would like to suggest that you consider making native apps for all platforms you intend to support.