Share task list between people using iCloud - ios

I'd like to create an iOS app for shopping lists (yeah, one more), allowing synchronization between 2 (or more) iCloud users (like what Apple does with shared calendars).
Any idea how I should structure my data to accomplish that ? Can I do that with the tools iCloud offers at the moment in iOS 8?
EDIT: I'm especially interested in the sharing part of the process: how to "invite" other users (as in the Calendar app to "Add Person" for a shared calendar), or maybe include Family members (as declared in iTunes) in
the app.
Thanks

iCloud app data is sandboxed and not accessible by other users https://developer.apple.com/library/ios/documentation/General/Conceptual/iCloudDesignGuide/Chapters/iCloudFundametals.html
In CloudKit there is a private and a public database. when you write to the public database, then that data could be read by others. https://developer.apple.com/icloud/documentation/cloudkit-storage/
Cloud Kit may be your best option

Related

Share iCloud Key-Value Storage with app from other Developer

The question might seem weird (and stupid) at first, but keep reading...
I used iCloud Key-Value Storage in one of my apps and now I need to Transfer this app to another Developer Account. But it's, for some reason, impossible to transfer apps if they've used iCloud Entitlements (why no warning?!?!).
So...In other words, I need to remove my original app and create a new one in my new Developer Account. But before that happen, I want my existing users to be able to sync their data to a common iCloud Key-Value Storage, but directed at the new app "container".
If, the "new" app is Live, would it be possible to point at that app Cloud Container (from my old one)? (e.g. my old app saves iCloud data to the new container).
When reading my own question I just think "this sounds like a big security breach if possible", so my guess is, no. But there's nothing in the Apple Documentation that says that this is not possible.
I'm not interested in solutions that involves users saving data on an external db (I know this is possible, but not what I'm looking for right now). Is there some way to save the data locally on disk (without being removed when app is removed) and then read it from the other app?

What different ways are there for apps to store data in iCloud and which are visible from the iCloud Manage Storage

There seem to be a few different ways for an app to store data in iCloud (iCloud Drive Documents, Core Data with iCloud Sync, CloudKit Private Databases, Key Value Pairs etc) but I'm not sure if that's all. Which of these different types of iCloud storage appear to the user in the iCloud 'Manage Storage' menu (i.e. some apps don't appear at all whereas others list 'Documents and Data' whereas others list files that can be individually removed but don't appear in iCloud Drive)? I'm trying to figure out but the documentation's a bit vague on this.
Aaron,
There are three "Apple owned" places you can store data for an iOS device, on the device itself, in an iCloud Drive and/or in the iCloudKit database.
The iCloudKit database has within it three more places. Two of those are databases in the true sense of the word, so structured areas you can store information within, namely key/value pairs and CloudKit. A CloudKit database itself breaks down into two more principle divisions, public and private areas.
Their accessibility is governed on a user/app basis. So you as a developer can opt to use or indeed make your files accessible on them or not. The rules governing who can access what can be confusing, especially as they can/have been changing over different iOS releases.
The iCloud Drive is the most and least flexible, you can store everything on it but you cannot share anything within it, except with yourself.
The iCloud key/pair database comes next, except it is used exclusively by an application to store application state/preferences only [it has a very limited space], again you can share it with yourself only.
The CloudKit database comes next, again something that would be used on an application by application basis. So apps do not share databases and cannot access other app databases, unless they come from the same author and sharing is a built in functionality that has been explicitly intended.
That said, the CloudKit database has two distinct areas a private and a public one. The private area can be accessed by a single user of an app, the public area can be accessed by anybody using said app on any iOS device.
CloudKit documents are an area where Apple store documents from its apps principally, so keynotes, pages and numbers; although they have opened it up somewhat in recent years. They can be shared with other users too using on of the apps designed specifically to store data within the iCloudKit documents area. It is the closest you'll get to a dropbox under iOS, short of using dropbox fof course.
Finally you can store data on your iOS device itself and opt in to share that with others on the same device too thru Apple's files app, although that that is a very recent status quo, so only available for apps designed to run under iOS 11 explicitly opted into the new status quo.
All that said, Apple counts all the places as one in the same when it comes to storage limits, be warned if you want design/build an app using cloudKit storage; if Apple deem you did so recklessly, you won't get a foot in on the app store.
As final comment Apple security policies are designed as a general rule to ensure you as a user have quite fine grained control over who accesses their data, it was/is an intentional decision on their part to protect you from yourself. As a general rule, it works well; which is why you see almost no viruses under iOS.

CloudKit share private Container between users

I'm planning to develop an App used to share infos about geographic locations (coordinates, notes, pics), a kind of Treasure Hunt and I did not understand if it is possible, using CloudKit, to share part of a private container between users. If it is, how can I do that?
I'd need to create something like Apple does in the Reminders App, where a user can "invite" other users and have a common list to share between them all where everybody can insert or edit stuff.
Eventually if it's not possible to do it using CloudKit, can I do that with Parse?
Thank you!
In iOS 10 / macOS 10.12, it is now possible to share hierarchies of records in a user's private database with other users.
An Overview: [WWDC 2016] Session 226 - What's New with CloudKit
If you want to start diving into the new documentation, check out:
CKShare
CKShareParticipant
CKFetchShareParticipantsOperation
CKFetchShareMetadataOperation
CKAcceptSharesOperation
And this thread in the Apple Developer Forums, which provides some example code.
Data in the private container can not be shared directly. You should use a public container for that functionality. You just have to create the right filters in your app so that you only share the data with the people you want to share the data with.

Store temporary data outside of iOS app

I have an app that is uniquely branded for each customer (think restaurants, etc.) I need to have the user be able to click on a link to my server that contains a unique code, stores that temporarily on the iOS device (cookie, etc.) and then directs them to the app store to download the app. Then when it is downloaded, the app grabs that cookie or temp. data on launch and brands the app for that customer. I know this is possible on Android, but is it on iOS?
Downloading the app first and then selecting the brand (or restaurant) is not feasible in this case, as the url wil be shared with other customers of the same business and we want to create a fluid experience, where they won't be able to "see behind the scenes" and choose a different branding.
Thanks
Edit
Thank you for all the replies. We've reevaluated and are considering having the url be opened on the device and grabbing the IP address or another unique id, and saving that along with the correct brand to a database. The app will then connect to the database on launch, and if the IP's match, will brand accordingly. We're looking for a more reliable identifier than IP, however. Now that UDID is deprecated, are there any other identifiers we can use?
I think the design you propose of a webserver link creating the code that needs to be read by the iOS app later is the issue. You should have a solution that is entirely app based. Perhaps you can have the same services on the website be available as one app which then sets up the code in pasteboard. The user then launches the actual app that looks at the pasteboard and skins itself accordingly.
That being said, data can be shared between apps from the same app seed ID by using UIPasteboard in addition to a few other ways.
I use the pasteboard to share info between apps quickly and easily using this class.
You can use identifierForVendor (UDID replacement) to identify individual devices. Are you planning on harvesting those identifiers prior to the end user "registering" the device at the final location? If not you'll never be able to determine which device belongs where.
What about having the end-user logging into your server as that restaurant? It can be a somewhat generic login per restaurant like "Wendys/Wendys5?" and "McDonalds/McDonalds7!" to determine their App Store URL. As long as the password is easy and non-programmatic to guess it would be unlikely they figure out how to register as a different restaurant. You could also do a simple restaurant selection screen coupled with a password specific to each chain but this would expose the user to which other restaurants are using the app. This way you won't have to continually add IPs if they expand locations and can revoke credentials if the login is compromised.
One question, though: Do all of your clients understand that they'll have to have an AppleID tied to each device? You can only shared a single AppleID across 20 devices.

iCloud public data possibility

I am developing a iOS/OS X application with a very "nice to have" feature: possibility to sync with non-iCloud clouds.(through web server in example).
The app design already is completely based on iCloud so I was thinking there might be a workaround I could use instead of writing code for one more data marshaling.
Basically what I need is to make some iCloud stored data available to the public OR get user's e-mail/password used for iCloud on iOS/OS X.
The reason why I need it - I'll have to sync data with another cloud and I want to keeps the app lightweight and so move everything to the server (I think I might need OS X server).
Anyways, any suggestion are appreciated a lot!
I can understand wanting to do that, but just because you want to do it doesn't mean that you can.
Basically what I need is to make some iCloud stored data available to the public
I don't believe that there's a way to do that. iCloud isn't a generalized internet hosting service; it's a service designed to make it easy for an individual user to share his/her private information among several devices. Creating the possibility of making information public would only undermine the trust that people put in the service.
OR get user's e-mail/password used for iCloud on iOS/OS X.
That'd put your users in direct violation of the iCloud TOS, which state in part:
You further acknowledge and agree that the Service is designed and
intended for personal use on an individual basis and you should not
share your Account and/or password details with another individual.
If you want users to be able to sync their data with other hosting services and you don't want to build that functionality into your mobile app, you might consider building a MacOS X app that the user could run to sync the data.

Resources