Building iOS app, website, and backend - ios

I've only recently started to delve into how building apps work. I'd like to know what the general setup is for a mobile app and a website, in which users can update information on the app through the website.
I'm trying to learn how to make an iOS app with Swift, and use Amazon Web Services as the backend for it. If I wanted to then make a website that would change data on the mobile app, would I have to create a website from scratch with Ruby or Python, and then somehow connect that to the same AWS backend that my iOS app uses?
Thanks.

Usually, most data is stored on a website. Your website can have ways of viewing the data, such as web apps, like jcaron said. An app is usually used for viewing data from the website. When I develop apps (with Swift) I setup a database on a website and connect it to the app using PHP scripts. Then I make the app, with it's own UI, which does HTTP requests to the website and uses the data.

That's a very broad question, with lots of possible answers, but here are some of the options:
you have a native (Objective-C or Swift) iOS app, with its own UI, etc. It exchanges data with your back-end server, which stores stuff in a database and/or forwards messages between clients. Then, you have a website, using any language/framework you want, accessing the same database.
you have a web-based application: you use exactly the same code (with responsive design of course), serve it from your servers using any language/framework you want, and just embed that in a web view in your app
you have an hybrid application: this is close to the previous option, but you do most of the coding client-side (i.e. using Javascript, possibly with frameworks such as Angular) within a Cordova/Phonegap app. The same app would then be deployable as a native app as well as served as a website. You would just have back-end code on the server.

Related

Can we support offline Single Page web apps in iOS 10+?

We are developing a Single Page RWD web app which supports all mobile form factors. We would like to
have the webapp support offline browsing capability as well
Once the data is downloaded from server, user should be able to see that data even if there is no internet connection.
Users should be able to fill forms, and later submit it to server, when there is internet connection.
Can we use the AppCache, HTML5 storage to get the offline capabilities? If we are using hash to change the navigation in address bar the whole page refresh problem is also not there.
Was going through some of the older posts in Stackoverflow on this. Offline iOS web app: loads my manifest, but doesn't work offline
This post is dated back in 2011. In 2017, can we support
If you want to open something from an URL to the webView, you need internet. You can do the following thing in the iOS application with certain conditions.
Users should be able to fill forms, and later submit it to the server, when there is an internet connection.
You need to cache all the responses when using the native iOS or any other cross platform. If you are wondering about PWA, it is coming in the 11.3 version of iOS. Refer this link to understand more about the service workers in the WebKit. It is a beta version, so do not expect it to run bug free.

Record audio in mobile Safari

I need to create an iOS app that just displays a website. The site allows users to record audio. The purpose is to let mobile Safari users to record audio (which is currently not supported). Are there any decent solutions for this or am I going to have to hack my way through? So far I have the following two ideas:
1) Build a native application that contains a WKWebView of the site. If the website detects mobile Safari it will launch some JavaScript that the app can respond to (or it will try to bring the user to the App Store using Universal Links). The native app will then record the audio and send it back to the website somehow (either through an external server, or perhaps through JavaScript, not sure how much data can be passed, but it could be up to 1MB).
2) Use an existing solution using perhaps Cordova/PhoneGap.
Hope to get some tips!
Build an hybrid application based on cordova/PhoneGap seems to be the best in my opinion. In addition you can build for iOS and Android (if you need later).
You can easily use this plugin to achieve your app.

Turn web app into iOS app with push notification

I developed a web application for a customer.
Web users can login and have their private account.
The application manager want to send "push" notification to users connected on iOS mobile devices.
Since I cannot achieve this feature with a simple web applications but I don't have resources to develop a native iOs application, the question is:
Is there a simple way to create an iOS "wrapper" to my web application and enable push notification for that app?
It will just be a webView pointing to my web application?
I'll be grateful if somebody can point me to resources, skeleton apps, alternative solutions, etc.
The kind of app you are talking about would be rejected from the app store due to the poor value aported in comparison to your website. This is part of the policy apple applies for a while now.

Applications that require a web server for full functionality

Is it possible to deploy an iOS application that requires a Node.js socket to do something on a computer?
For example:
Application -> Node.js socket -> Doing something on a computer
Computer does his job -> Response from Node.js socket -> Processing data with application
I don't think that Apple allows this, but one of my friends is sure about it. My point is that this solution does not reflect to an easy usage instead of making it a little bit complicated for average users.
The answer is yes. I don't know how to integrate Node.js into app, but there are many other server that can be easily added to app, such as CocoaHTTPServer. I have created a project to manage files inside app sandbox. Open web page hosted by app to manage files. I know some other apps, which provide web page hosted by app to transfer media files.

What is advantage of embedding HTTP server in iOS app?

In linked in implementation, they have HTTP server implemented in iOS app. What could be the reason behind this architecture, if uiwebview already handles the HTML loading and rendering.
I don't think they have a HTTP server embedded as much as they are just making very liberal use of UIWebView and the features of HTML5.
And the benefits of doing this are that they only have to write a relatively general implementation of the LinkedIn mobile interface in HTML5 and those changes get carried across to iOS, Android, Windows Mobile, and whatever other mobile platforms support HTML5.
I have a couple of apps with an embedded HTTP server. This is used as one possible method for importing/exporting data to/from the app. The user connects to the app from their computer's web browser to the server on their iOS device. The user can then download a file from or upload a file to the app. I added this feature before iOS supported file sharing via iTunes and the Documents directory. It's now one of several ways to get data to/from the app.

Resources