Is there anyone who worked out a synchronisation plan for a mobile application? I've been searching for it, but can't find a good example. I'm looking for a plan such as I think evernote uses to sync the files on the mobile phone with the backend.
My current plan:
- when you start the app: all your files will be downloaded from the backend using you username and password
- when you create a new object and there is network connection: object is stored localy in the core data (IOS), and transferred to the backend
- when you create a new object, but there is no network connection: the object is stored locally, and transferred when you are connected to the network and press sync.
All suggestions are welcome!
tahnks!
Sorry, I did forget some important information...
I'm using a grails backend
the frontend (mobile application) is an IOS app
Is there a good way to make sure there are nog file/version conflicts between the different devices?
You cold use various ways.
At my advice, the best one is to use the Parse framework. It is very easy to use and simple. Log in and save objet all in one. Please visit this: http://parse.com
Otherwise, You can use iCloud to store and synchronize your objects.
Find the Mobile Backend-as-a-Service (MBaaS) that fits your app best.
This link can get you started in your search.
Related
I'm fairly new to swift and backend development, so please take it easy on me if my logic is flawed.
I'm trying to build an uber style app for ios and have a user side interface, a driver side interface, and a backend built in node.js. My question is how do I communicate when someone has chosen a "driver" from the user side to the driver side. I'm assuming it's a combination of a put request from the user side with get requests from the driver side, but I'm confused as to how to notify the driver side app when changes have occurred. Do I have to constantly be making get requests to the database or is there a better way to hold a connection between node and the app?
Any help is greatly appreciated.
Let me start out by saying that I don't have any personal experience with the technologies/frameworks I mention here (apart from Realm, but not for the purpose you're after), so, consider this a list of things you could look into.
Websockets
One way of doing this could be using websockets to hold the connection. If that is what you're after, then you could look at this tutorial about using websockets in an iOS app.
However...I can see some problems using straight websockets. For instance: what happens if your app is backgrounded and a message is sent to it? You won't get a notification as far as I can see.
Therefore you could also look into "pure native" frameworks to help you. By this I mean Realm or Firebase
Realm
Realm is a mobile database to use in your apps, compare it to Core Data for instance.
Some time last year however, Realm released something they call Realm Mobile Platform.
As it says on the tin:
Realm objects are always live, which means that they always have the latest data. Subscribe to notifications to get updates when data changes, then update your UI.
Maybe you could use that for your "driver side" app? Push a ride to the drivers database and it will magically be pushed to his/her device.
Firebase
Another contender is Firebase. They have something called Firebase Realtime Database which seems to do more or less the same as Realm Mobile Platform.
So...if it was me, I think I would look into one of those two products, but...I don't know if this collides with your current node.js setup.
Hope that helps to raise your confusion to a higher level at least :)
I have been working on iOS application for sometime, and I am using Core Data to manage the SQLite database for the application. The users of the application can update the data associated with their account using the application, but I would like to create a simple web form where users could update certain information asosciated with their account. Basically I would like a user to be able to access a web adress from their personal smartphone or computer, login, then update information asociated with the account stored on the iOS device. What are the possible solutions I could use to accomplish this?
Breaking down your question:
Currently you have an iOS app which uses a local SQLite DB to store data
You want to let users update information in this DB remotely (i.e, via a web site)
Unfortunately to do this you're going to need to make some significant changes to how your app works. This is because it's impractical - if not nearly impossible - to do this kind of thing and keep the database local to your device.
The standard way of achieving this would be to store your database remotely on a web server, and then have both your app and your web form interact with this server to retrieve and update data.
There are lots of different ways to do this. Fundamentally, you'll need a server running a database, and a web service to access it. You could implement this yourself, using something like MySQL or PostgreSQL, along with a language of your choosing (Ruby, PHP, Node, etc). Another option is to use one of several 'backend as a service' providers. These are companies that provide 'out of the box' backend functionality for mobile apps. Two popular providers are Parse (owned by Facebook) and Stackmob.
Whether you choose to do it yourself or use a backend provider will depend on how confident you are. It's not an especially hard or tricky thing to put together on your own, but there are several common pitfalls you're likely to encounter.
If I want to setup a database for an iOS app, and kind of make the app work in a sort of MVC style, is this possible through iOS alone, or do I need to create a web application to handle database interaction etc?
I would really like to be able to set up cloud storage/databasing directly from an iOS app. Is this possible? Does Apple have a platform for this, or do I need my own server?
In iOS the work with a web based services is very easy but on the other hand: need a "connection file".
it works like this:
the iphone has the info > sends it to a php/asp/asp.net/server side page, this page is taking (by "get" or "post") the info sent and than inserts it into the database, saves the file on the server and etc..
For reciving content from a web based service you also need a server side file to handle your trafic to the database, but now the output you get is in JSON.
you get back to the app an array (the file sends the array back) and than you use the array for handeling the conent you just got.
It may sound very hard but it is not as much as it seems. For your questions: there is not a way to connect directly through the app to a Cloud DataBase.
Now, when talking about owning a server and so: there are not so many companies which provide a cloud databse alone. but even if you get a cloud data base you can always host a domain somewhere cheap and the pages are only a few KB in weight any way...
And those files will be for connecting to the DataBase (The middle-men for the app).
That is a short explanation about connecting to web based services in iOS Developing.
I a thinking of creating an iPhone/iOS app that would include a feature where one user could create a list of words and then save them to their account on a server. Also (and this is very important), the user could share their list with other users by giving them permission.
So my question is, how can I go about creating such a server? For right now, I have a home computer (running Windows XP that just stores data for my music system) which I can use to host the server. I am also open to the use of other online storage services like Google Drive or Dropbox (I can't remember if Amazon does anything like that). However (and I know this may complicate things a bit), but at least for now, I want/need to stick with free services/options.
Just to recap, the key features that I am looking for are:
create users/accounts (on the server)
eventually I may [try] to incorporate the use of other services to log users in like with their email account, OpenId, etc.
the ability to access (log in to) the server (with credentials) from my app
the ability to send/receive data between the server and my app
the ability to share data between users
I know this is a lot to ask for, but if anyone has any suggestions or can get me going in the right direction, it would be much appreciated.
The basic setup would be as follows:
Backend: Database (MySQL), Web server (Apache), with server side scripting (PHP).
Client: iOS device with developed app.
Communication: use HTTP client/server model, communicating with something like JSON.
This is much the same setup as a web server, but instead of serving html/css/javascript etc the results will be JSON.
As far as implementing specifics such as login in, and sharing data between users, this is purely dependent on your implementation. This is not trivial, and not something that can be easily stated in a single post.
Hope this helps.
You could build your own webservice in PHP, Ruby or Python. If you do so I would recommend building a RESTful webservice (http://en.wikipedia.org/wiki/Representational_state_transfer) and then use RestKit (http://restkit.org/) to handle the data in the iOS app. Especially RestKit's CoreData integration is nice in my opinion.
Another solution would be using a service like Parse (https://parse.com/products/data). The first million or so requests per month are free but after that it could get pricy. I personally have not tried it so I couldn't tell you if it is any good.
I am new to iOS app development and am interested in developing an app that needs to utilize existing technologies to sync app specific data across multiple i-devices (iPhone, iPad, Touch, etc.). As an example, the app can be installed on multiple devices. On one device, the user will initially create an account. Then in subsequent logins, the user may create a task list, and each task item may possibly include a captured photo image. On the user's second i-device, as he logs in, he would be able to see and access the list and images (locally). Can someone explain to me what technologies I can leverage on to implement such an app?
Specifically:
How do I set up and manage the user accounts? Do I Need a dedicated server and sql database set up for my entire user base? And what programming/scripting languages do I need to learn?
How about the mechanism of pushing and pulling app data from one device to another? Do I need some kind of cloud technologies (SaaS?) to handle the storage and transferring of the data?
Any specific open source or commercial products I can leverage on?
Thanks in advance.
Kenny
I personally have not have had a situation like this, but here is what I would recommend.
You will need to have a server set up with database software.
You will need to write an api for yourself based on HTTP POST (REST) or maybe you could write a SOAP service.
I would HIGHLY recommend purchasing an SSL cert. for your server that way you can send the username and password in your request and it will be encrypted automatically.
For the api, you have a whole selection of languages and databases at your disposal. I am personally biased towards asp net with an MSSQL server.
with your api you will need to write methods to authenticate the user, and then save and send your data.
In your app you will simply send web requests to the server (ASIHttpRequest maybe?) and you can receive JSON responses back, which you can then deserialize into workable objects and vice versa.
if you do use asp net, you can use the newtonsoft JSON library to convert your objects for sending and convert received objects.
I dont remember the name, but there also is a JSON library for obj-c that is usable on iPhone.
Use a SQL server and host a database of logins and passwords.
Then, from each device, create a connection to the server, and download the login information for the account.
Also, not to be rude but: Google it.