I created a Web App(PWA) via React and Bootstrap. It runs perfectly. I planned to create an Android and another iOS Apps that have only one page with a Webview that loads my Web App via URL and ship those Apps to the customer.
My question is that there is a better and standard way to this? I heard about Hybrid Frameworks like IONIC but as I understand, IONIC Apps, Are web Apps that run on device not loaded from a URL, Is that right?
What I want is that my changes in the server affect all users and Apps installed on their devices. Because of that, I created the PWA App, not the Native App. I searched a lot but I can't reach a final decision.
Used to be I was an Android developer and had a lot of problems with shipping the latest version to the customer, Now I want to use Web-based technologies to reach Apps that works like a website.
The issue here is: you will not be able to use the devices resources if you load the PWA in a Webview. For example push notifications will not work. A PWA can be installed onto a phone and windows as an application. This will have push notification on Android and Windows but not on Mac or iOS (Safari is the new IE). You need to go Hybrid or back to Native if you need more.
You are right with IONIC. It is a wrapper for a webapp stored on the device but it allows us to use native features (push works on both Android and iOS). But you still have the distribution issue since you need to publish to the stores every version. Not even mentioning the hoops apple gets you through when you try to publish.
The good thing with IONIC is you have a single source code for multiple platforms and you can choose the library you want to build with. It used to be Angular but now you can choose ReactJS, Vue, Angular or ES. Which makes it way friendlier.
With IONIC you could build the native features and lazy load the rest as dynamic component from a url: stackoverflow question if you do not care about backward compatibility.
I did both PWA and IONIC. Both has their pros and cons.
If I do not care about iOS and Apple I would stay with PWA otherwise IONIC.
Related
I have a Node.Js app running on a publicly accessible server.
I want to make it possible for users to access it as a native iOS app.
Is there a simple way of simply making an iOS app and having it show my Node.Js app running from the server? Or it's more complicated than that?
I looked into PhoneGap but maybe some other recommendations also?
Thanks!
PS I know the question is broad but that's why I'm asking – to focus my question and to know what to do next.
Node.js - this is a server side application. So you need to build client application which can communicate with your node.js server by Rest api or so...
As you mentioned you can build hybrid html5/js app with PhoneGap, Cordova, Ionic "wrappers/libraries" which will pack it into native iOS/Android/... application and that app can talk to your node.js server and transfer data you need.
Also, as Daniel Larsson mentioned for some specific pages you can use webview to display page straight from the web, but webview can be a part of your application but not an entire application, because Apple will reject it during review process.
If you want to port your existing web-app over to being a native app on the app store, I can positively recommend PhoneGap having developed multiple apps with it after completing the same research you are doing now.
As NYS said, you'll need to package all your web-app design (HTML/CSS+images/JS) inside the PhoneGap app, any other way simply wouldn't be responsive enough.
As for what to do next, I would dive straight into creating a PhoneGap application and see how your app runs inside the Cordova wrapper out of the box. The issues I faced were with scrolling on divs holding content, and non-responsive click events, both were easily solved with javascript libraries.
Cheers Chris!
You may use Socket.io for native option.
http://socket.io/blog/socket-io-on-ios/
https://github.com/socketio/socket.io-client-swift/
https://github.com/pkyeck/socket.IO-objc/
https://github.com/square/SocketRocket/
I'm developing a web app using HTML5,CSS3 and JavaScript.
Then I want to use the Apache ordova platform to generate a native android app from my web app but I still don't understand what do I need for this,specially do I need a server-side development with php for example??
First off i suggest you read this
Pretty much your app will be able to accomplish a little bit more than what you would be able to do in a browser if all you had available was the ability to write html/js*.
*by this i mean that you have access to device-specific hardware which is not available in a browser and a few more things but pretty much that's it.
You will need to install node.js (or io.js), then install cordova through npm, and make sure you have the Android SDK installed. Once you create your project, your html/css/js will be wrapped into a native webview component, you do not need any server to render it, effectively your app is a native app that can be installed from google play.
You will need a server, typically a RESTful API, if your app needs to query data remotely or persist to some third party. If you are thinking through a classic MVC mindset (render a page through some php code) then you probably need to read about cordova and how it works. A cordova app is a client-side only app, no server-side processing is possible unless through a network communication to a server you have access to on the internet. You can do persistence locally (to the android device) and even use a local database, but remember that this db exists on the device, so you won't be able to share information between users unless you somehow coordinate that through your app (and most likely a server-side app / rest api).
It is unlikely that your existing web app can be wrapped into a cordova app straight away, cordova apps are single page apps mostly.
I'm considering building a mobile Web application, using Jquery Mobile that will be used to track truck delivery.
I want to be able to periodically send gps coordinates back to the server? Can this be done if the screen is off?
If not can some alternate approaches be suggested..
If you are good in javascript and html you can go for phonegap. this framework will work like a native application and running from webview like browser. Since phonegap is a cross platform framework you can make your app compatible to many devices like windows phone, Apple, Android. To know more about phonegap or cordova click here
And yes phonegap does many function or features that can customize your application in many way. for example "WAKE LOCK" which keeps your application awake till you force close it.
or if you are using browser you can not run your code for long since browser is a big application android or your mobile system will close it.
I just want a framework that allows me to build cross platform apps with HTML5 for at least iOS and Android. The problem that I'm having here is that I can't build PhoneGap or Appcelerator Titanium apps for iOS since I don't have a $99 developer subscription. I might have one in the future, but for now I can't. Is there anything like these frameworks around that doesn't require a iOS serial? I don't want to use one of those online tools that don't require coding. Preferably something like PhoneGap so I can access some of the phone's sensors, like the GPS and Camera.
If you want to publish in the App Store, you need a developer account. In order to get into the App Store, your app must first go through Apple's internal approval process, and you can only apply for that approval if you have an account.
The only way to publish in the App Store without your own account is to piggyback on someone else's account (e.g., publish it under a friend's account). It's unlikely that any publication service would let you piggyback on their account: what if you tried to publish malicious code and got their account in trouble with Apple?
If you don't need to publish in the App Store, your unapproved iOS app is still runable on jailbroken devices. If you do want to have your app in the App Store, you must get an account.
I want to build 1 UI for several phones (windows phone, Android, IPhone, etc).
My plan is to create an HTML5 UI, and use JS to invoke applications that are installed on the mobile device.
For example, I create windows phone 7 application without UI, and invoke functions of this application from the JS in the HTML 5 UI.
Same goes for android, IPhone, etc.
Is this plan feasible at all?
- How can I call windows phone 7 silverlight app/Android from JS?
Calling a native app from the browser is
possible on iOS: Opening Native App. from Safari
possible on Android: Launch custom android application from android browser
impossible on Windows Phone 7
On iOS, you can't create a web app that calls native code, period. You mention that you want the app to have no UI, so I'm assuming you want to have a web app that invokes native code which in turn causes something to happen in the web app, or even causes something to happen on the device. Won't happen. You can use the iPhone's Custom URL Scheme to LAUNCH an application with given parameters so that when it opens it immediately does something, but you will get kicked out of the browser and in to your app. And App Store Guidelines wouldn't let you make an app that has no UI. It also doesn't allow for the creation of apps that are just WebViews wrapped around HTML.
On Android, I would imagine that you could create an app that is nothing more than a WebView that loads your webapp, and in that way you would have access to the native code you wrote for the device, but I don't think that would meet up in the middle the way you want it to when it comes to having the native code manipulate your web app. Plus Android UI's are mostly XML with a little bit of backing code so at that point you may as well be making a native app.
The browser in Windows Phone 7 does not currently support HTML5, though it is expected to arrive later this year. That said, I would extremely surprised if there was ever a public API that enabled a web site to open an application on the host device and I'd be surprised if this was allowed on Android or iPhone, too.
The only application that I'm aware of that exhibits this behavior is the YouTube application. If you visit YouTube.com on the WP7 browser, then it either launches the YouTube app if you have it installed, or prompts yout to download and install it. So, the capability is there, but I doubt very strongly if Microsoft would ever open it up beyond a close partnership for specific applications.
In Windows Phone 7, you can use the WebBrowser control within an application to host/browse web content, and from the application you can call javascript methods exposed by that page as described by Shawn Wildermuth in his Navigating with the WebBrowser Control on WP7 post.