I am using Ionic and Cordova to build a mobile app which will go on the iOS and Android stores. I have done this many times, and I really hate the process of having to update the app (specifically with Apple).
Would it be safe to dynamically load all of my templates and controllers from my server when the app loads, potentially caching them or having a server call to check if there is a new version? Basically, I would have all images and styles saved locally to the phone, but load the templates and controller code on app load.
And, if it was ok to do programmatically, are there any rules against this in Apple or Android's terms of use?
This is possible and there are tools like Cordova Hot Code Push to help you accomplish it. As long as you don't use this to break other app store review rules or significantly change the purpose of your app it's fine with Apple.
Related
First, I have a web app made with angular + angular material that looks like a mobile app, now I "ported" this webapp to a native mobile app using capacitor + cordova plugins and works fine, all the features work fine.
My deployment proces is:
Build angular app, sync to android, build android and then publish in play store (same for ios), it works, but, every time I make a change to my web app, I have to repeat this process and you know, the user has to download the new version of the app, install, and use, I would like to avoid this.
Since my app is web, located on a site (It can be accesses via web too) I would like to know if there is something that inside my webview opens the url of my site (without exiting the app, I tried making a redirection but it opens a web browser), so, the end user won't have to download the new version of the app every time I make a change and I won't have to upload the build to play store and app store.
I know that it can be done because my bank app does something like this but I don't know how to do it or how to search for it
How can I achieve this?
Thanks and sorry for my english, I hope I have explained what I want to do
"Live updates" are one way to solve this. Live updates allow you to send patches to your app and actually change the app code to some extent without going through app store review. Big updates will still have to go through app store review, but you can make lots of little updates "live" by using a live update service.
You can do live updates with Ionic. Ionic is open-source, but the live updates are part of the Ionic team's Appflow package, which is a paid service. Pricing currently starts at $499/month for 25,000 updates.
In this same space, there's Capgo, which is cheaper and works with Capacitor in general (does not require Ionic).
More info: Long discussion on this topic in the capacitor-community github repo
Ionic is the framework that would fit your use case. You can build apps in angular and ionic wraps it in a webview of native android apps. If you need to access native android feature, you can install capacitor lib too along with ionic. Capacitor is a library to interact with mobile's api (IOS and Android) with javascript.
Anoter approach to build native android apps with JS would be reactnative. It is different from ionic. You would have to be familiar with react sytax to get statrted easily. React native is not a webview app rather it is compiled to native platform code.
Look into flutter too. It uses dart but apps perform faster made with flutter and it can build both for android and IOS with same codebase
CONCLUSION
If you want to stay in angular code, go with IONIC
I'm enjoying web development and I want to make an "app" to try my hand at mobile phone dev. Learning Java/AppleCode isn't feasible right now, so would it be possible to make a website that runs as an app on a phone? And have that app do the things people want apps to do, like integrate with your phone's calendar, receive notifications in the notification bar at the top (Android), etc...??
Yes.
Apache cordova will do the trick but you (of course) can't have php running, only html and javascript are supported (and the code in which the app is built).
Featueres :
Free :)
Code for multiple platforms in html and js.
Tons of plugins to do all kind of stuff for you.
Can (with a little modification of content security policy) load pages from a remote server.
Downsides :
Not the performance of normal code.
Only communication between app code and js is using callbacks, this results in true Callback Hell.
All app code runs asynchronously while js code doesn't.
Installation is not a simple .exe but an actual guide (i managed to screw it up, had to system restore to easily remove created files. But it should be rather simple).
Supported Platforms :
android
ios, can't compile for ios on non-apple though (thanks apple!)
browser (basically webserver)
windows
windows 8 app
windows phone 8
blackberry 10
and more...
What I want to develop: Crude Overview?
Suppose 10 web links present on my (native/web) app, and user will scroll through links. And when user clicks on any of the link, it will open that website. And user might wish to close this website and again views the list of those URLs on my app and the cycle may go on as per his wish. Also, user can create custom list of those links. Also, these lists will be updated regularly, may be on monthly basis. Which I guess I just need to update data files and not app.
No, it is not similar to browser bookmarks but in very crude terms you can relate it. Anyways, I will accessing user's bookmarks with his permission which I guess can be easily done with the APIs available.
Right now, technologies in my mind.
1) Phonegap ( to be precise, its phonegap build - as I don't have MAC) with JQuery mobile and deploy as native app,or
2) SenchaTouch and deploy as web app or native app using sencha cmd.
3) I want to use MongoDB along with above 1st or 2nd option. Is it required or JSON can suffice? Also, I may need some security by encrypting this data while storage at user's mobile and also while collecting user's custom lists.
4) In future, I would also need Node.js for the purpose of collecting MongoDB or JSON data files in above 3rd point. Is there any other way so that it can be integrated with phonegap or senchaTouch.
Please suggest things if existing resources can help me develop my idea and guide me what to use!
Note: All technologies I am picking up are focused on single code base with minimal focus on platform specific changes-iOS/android/Windows/Blackberry.
I want to go for Native app rather than web app. Why?
1) I feel that it would perform faster if I deploy my idea as android/iOS/Windows app rather than web application.
2) My cost of hosting the application on server will go to null because I am using local storage of the user's mobile.
3) Since I want a feature in my app which stores user custom settings so it would be better if I deploy it as mobile app rather than web app so that I don't have to maintain user specific settings which may make my DataBase hosted on server to grow immense in future.
4) Also,I feel that there is no sense in hosting this application on a dedicated server because there would be less user interaction with my backend. But later I would plan a feature to collect data/settings done by user to improve feed for which I think I need to use Node.js. But then also there is no requirement of hosting frontend to a dedicated server. Hence, I can use dedicated server to serve my own purpose of analytics to improve feed rather than service user's purpose of unnecessary access to my web application always through the server and fetching lists of links which are maintained on server in custom manner for him.
My dilemma!
My above points are valid to prefer deploying as native app over rather than web app. But I feel what if I keep my app as offline web app which runs on the default browser of the user but loads the jquery and other data and scripts from the storage in mobile. Is this possible? I am unaware of this.
If this is available then it is the best thing for me to adopt as my application redirects to other websites. Because, if I am deploying my app as native app then it would ruin user experience of opening my app and selecting an option whose URL opens up in default user's mobile browser which is a different app and then there are many chances that user will switch back to my app and then again he would be redirected to that mobile browser. And obviously I cannot develop my own browser in my app as I would have to develop several things from security and other perspective which would be a cumbersome task. So, having my offline web app will be opened in user's default browser itself without annoying him to switch back and forth between my app and browser as in previous case and thus creating seamless experience.
Also, I am not sure whether we can create offline inbuilt browser plugins as we can do in chrome browser on desktop. If so, then I think I would have to concentrate differently on different mobile browsers Safari, Chrome, mozilla which I feel is not worthy. Please throw some light on this for me.
I have no idea why people are downvoting my question as I feel that it is kind of unique question.
Here is what I found more and with the help of my friend
1) I don't have to use MongoDB as my application is not much complex. So simple JSON will suffice.
2) I'll be using Phonegap for android and windows phone and phonegap build for iOS along with jQMobile. So the app will be in the native form only.
3) I'll be using inApp browser for seamless experience although it is not as perfect as having my idea as web app.
4) No need for senchaTouch as it is heavier than phonegap and not required for me idea.
5) My next look forward is comparing the above points with offline web app built using JQMobile and JSON and finally whatever I decide I will share.
EDIT:
I am finally going with phonegap for native deploy rather than offline web app or web app hosted on server for reasons that I found on several blogs.
People downvoted my ques so I feel that it is not worth writing answer further but if you want the detailed reason you can always add a comment.
Thank you
You should definitely go for web. It is cross platform. If you do an android App, or iOS App, they are restricted to the specific devices. So I definitely recommend Web App
This maybe a basic question, but I really wanted to ask it.
Consider a web application which is deployed on a cloud server and I want it to be available offline on a mobile(android device). Is it possible? Or will there be a separate installation on every mobile? How does phone gap or cordova help achieve it?
Yes it is possible. Cordova is an android application that has a webview (like a browser) for you to display an html app which is normally build with html+javascript. But cordova/phonegap applications should be made simpler than usual web application since smartphones has limited resources, unlike normal servers. There will be separate installation per mobile.
Phone Gap, Cordova etc. build native application, each user must install it to work offline. You can also build such native application manually by yourself with WebView. It can be easy to build but may require to changes in business logic to separate handle offline case, like store data locally and then sync when go online - this depend of application.
I need to create an application that does the following:
Is available for Android and iOS devices primarily, Windows phone support would be nice
Allows the user to use the app offline
Allows the user to download files (PNGs and HTMLs) from a webserver to be displayed later within the webapp (needs to be able to be viewed offline)
Doesn't require user to redownload all the PNGs and HTMLs if they clear their browser cache (would be nice if there was a way to keep them from clearing the web app cache too, but I understand if this is not possible)
What tools do I use for this? So far, I'm at HTML5 web app and I understand how to cache the site, but how do I get the files (PNGs and HTMLs) to be saved locally and not subject to being cleared should the user clear the browser cache? Is native for iOS, Android, and Windows the only way to go here?
Any help is appreciated...
If you want your app to work on multiple platforms and be available offline, your best bet would be to wrap your app in something like PhoneGap and package it up for the various platforms.
This allows for one common "HTML-based web app" code base but will require compiling for the different platforms respectively.