Cloud Data Storage across devices without Login (iCloud, CloudKit) - flutter

I do have a background as a native iOS software developer.
We had a couple of apps for iPhones and iPads that used CloudKit to sync data between the same App installed on different devices of a single user.
It was used for simple things like favorited items within apps that did not have any login or account mechanisms.
How would I achieve such a functionality in flutter?
Havent found any iCloud related plugins for dart/flutter.
Thank you!

I do not believe there is a direct way to access the CloudKit from dart/flutter, however, there is nothing stopping you from trying this architecture.
Build a (PHP?)/CloudJS application on a webserver to serve REST-ful API calls that send/retrieve data from CloudKit Containers (CloudKit Web Service Reference). You'll want to set up some server-to-server authentication for this to work.
Posting/Fetching data via the REST API calls from dart/flutter. There are many libs that facilitate this and author (BRIJESH) over on androidkt.com offers an interesting walkthrough of some options.

Related

How to manage sessions in Realm Mobile Platform?

I was trying to make an iOS app with real-time collaboration using Realm Mobile Platform (Swift 3) and got stuck with lack of docs and examples. At the moment I have user authentication through realm object server. I can sync data between server and all users. Now I want two users to connect within a session, and then to sync data between them like it was done in their drawing demo (watch the video on https://realm.io )
Realm Mobile Platform doesn't support sharing the data between different users yet. Partially resolved by this PR https://github.com/realm/realm-cocoa/pull/4275.
So for now, you should share one SyncUser between multiple people to share session like a draw app demo.

Application users account registration and login, best way to handle?

First of all, i'm new to Objective-C, so please be patient with me.
I want to add to my application users account management, users can register/log-in into a personal account that will synchronized with database on the internet. I dont have a clue how to do that. I know how to work with sqlite3. I was thinking maybe to create an sqlite3 database on the device. is it possible to store images into sqlite3 database? is it the best and efficient way to manage users on application?
what does sign in with Facebook or Twitter do? is it possible to add them both and another option for someone who doesn't have Facebook or Twitter?
What is the best way to handle account registration and login on iPhone?
Thanks alot!
I want to add to my application users account management, users can register/log-in into a personal account that will synchronized with database on the internet.
AFNetworking or ASIHTTPRequest can help you with this. create a web service api, maybe in php + mysql or any web scripting language you prefer, from the device you can POST your data like username and password and do the logic in your web service.
I was thinking maybe to create an sqlite3 database on the device. is it possible to store images into sqlite3 database?
what is your plan here? why would you create a database on the device? do you want to manage the users locally? if yes, that would be easier and more efficient because you dont need internet connection to create a request to server. and yes its possible to store images in sqlite by storing the image as blob
what does sign in with Facebook or Twitter do? is it possible to add them both and another option for someone who doesn't have Facebook or Twitter?
Yes its possible. you can have three log in options. facebook, twitter, and your custom log in option. if you want to integrate facebook and twitter on your app. there are many tutorial and docs you can find there.
I suggest: this for facebook and download the sample app
What is the best way to handle account registration and login on iPhone?
it depends on your app requirement, if you dont need to store your user data in a database on a cloud server, the best way is to create a local database on device.
This is a broad question - so the answer is going to be very general, little of which has to do with Objective-C, iOS, or Mac specifically.
It sounds like you are creating an application on a mobile device that needs to synchronize data with a database for which the mobile app is a client. One way of managing this is to start with table of users and credentials on your server, e.g. in MySQL. Then you need to write the API on the server side, e.g. in PHP, Rails, Python, etc. Then you will write the web service code on the device that interacts with the server's API.
If you are new to developing on iOS, then I would suggest running through some tutorials on consuming web services, first. That is, I would learn how to connect to pre-existing web services first. You might want to check out the AFNetworking library for Mac and iOS. It has some demo applications. But if you want to stick with the native URL loading system on iOS, there are numerous tutorials available. (Here's one)
I should mention another option is to use Amazon Web Services SimpleDB. There is an iOS SDK. It allows you to execute queries directly against the db without writing the server-side code.
You mentioned sqlite3. This will allow you to manage data on the device; but you state that you want to sync data with some resource on the internet. You can store images in sqlite3; but you can save yourself a lot of hassle by looking into Core Data as an alternative.

How to add data sync (Google docs) ability to iPhone app?

I would like to enable my iPhone app's data to sync with Google docs. How can this be done? What other sync'ing options do I have (another one I am aware of is EverNote Sync Server)?
try nutdb app for iphone. nutdb will sync every nutdb database with google docs hosted spreadsheet.
It is hard to give a specific answer without more detail, but Google does provide an API that allows some manipulation of document data. The httpriot library is a handy way to simplify access to REST structured web services like this.

What is good way to register users from phone app

We have a web application and we've built phone applications (iPhone, Android, BlackBerry) to be companions to the site. The usual workflow is that an existing user of the site gets a phone app and then plugs their existing credentials into the phone app and they are off and running, but more often now we are seeing folks who are downloading the app and then (and this should not surprise anyone) don't read the help screen that explains they need to go and get credentials at the web site and therefore cannot connect to the application which does require registration to manage their content. This is a giant usability fail condition.
So we know that we need to put user registration workflows on the phone app.
Other than the obvious solution of duplicating our registration page on the mobile, does anyone know of a better identity solution for the phone? For example, on the desktop we also use Facebook Connect as an identity server and the users love it. I'm looking for something that simple that we can implement across the major smartphone platforms.
Clarifying note:
I should add here that this registration mechanism is likely to; and it would be desirable if it did, go hand in hand with a general identity/authorization mechanism such as the Facebook mechanism mentioned below.
One other place I'm poking around is to see whether there's an openId solution that does not require a browser to pop up.
Restful service might be the e asiest way for you to achieve this, you can use it on any device that can make http requests, so you can make your own login screens and talk to the s ervice that way...
Facebook has a Connect API for the iPhone. Integrating it into your iPhone app is very smooth.
http://developers.facebook.com/connect_iphone.php
On the BlackBerry we were able to build a fairly robust REST pipeline between the client apps in the field and our servers. We primary use the framework for updates, but the device API is generic enough to be able to build almost anything you need via standard HTTP/HTTPS GET/POST calls.
On the RIM platform, look into the HttpConnection API as a starting point. There is also an example on the BlackBerry Developer's site which will help. Finally, I believe there are several examples inside the sample package that comes with every BlackBerry JDE (IDE + API download).

iPhone: Need suggestion for SYNC contact

i want to create a application which sync my iPhone contacts to my server and vice-versa.
i read a article on google Get Google Sync on your phone . i want to this type of feature which directly update the contact without user interaction (however one time setting is desired).
any body have idea how the google sync work .
Please advice me that how can i achieve this task. any suggestion and link is greatly appreciated
I think it's important to separate the two overlapping approaches in your question.
Firstly, Google Sync is essentially a way to use Microsoft Exchange protocols and to setup a Mail / Contact / Calendar profile on an iPhone. The iPhone OS supports this feature, not an iPhone App in the App Store. Google Sync leverages this fundamental capability of the phone by exposing the data (mail, contacts, calendars) via these known protocols. If you want to expose data in this way to your users, setup a Microsoft Exchange server and ask questions on serverfault.
Secondly, there are iPhone apps. iPhone apps sold in the app store are not currently allowed to run in the background. This means you can't emulate functionality like iTunes or Mail where your music plays while you are browsing the web, or mail checking is done while you are playing a game of Mini Squadron. If you want this backgrounding capability, file a bug/enhancement with Apple.. However, you can interact with iPhone contacts (Address Book) via the API.. You can also of course "re-invent the wheel" and expose the data however you like via the internet, and consume that data from a custom iPhone App with the one caveat that users would need to actively launch your application to get to this data and it would not be integrated with the built-in iPhone Calendar, Address Book or Mail applications. Some good examples of that are some of the music community apps that have messaging systems built into them. Presumably that is all being done with web services.
EDIT: It is also worth mentioning that should you go the "iPhone App" route, you should at least consider if push notifications are right for you, and if so how you will handle it.
Have you seen the API-Docs?
http://developer.apple.com/iphone/library/documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/100-Introduction/Introduction.html
Next there is an application I use called Funambol - it is a sync4j Server/Client. They have an open source application to sync contacts on the iPhone. Source is somewhere in their repository, informations here: http://forge.ow2.org/scm/?group_id=96
As slf told you your application must run in foreground. This may limit you.
Good luck & best regards,
Florian
The 3.0 SDK will allow your application to read contact data on the phone.
Web services will allow you to publish that data to your server, and receive updates.
You may also want to use coredata to store a hash of all contact data so you can tell what is new / updated and just send that data to your server.