Best practice for allowing app users to manage CloudKit storage

OK, My app now runs on cloudkit and works fine and everything is lovely. But wait....


How does my user manage storage.


I can find no way in settings for him to see how much iCloud storage my CloudKit app is using. So how does the user know and how can he delete it.


It he deletes my app, that doesn't remove the cloud storage. There may be other devices using it. And even if he removes the app from all devices, I doubt it goes away. He may add another device.


But if he's deleted the app because be no longer wants it, he has (seems to have) no visibility of the storage that it is taking up or chance to delete it.


I can add a facility in my app to disconnect and delete cloud storate. But if we all do that differently, that doesn't help the user.


Is anyone aware of any defacto or recommended best practice, or any system level way that the user can see (the existance of) and delete the data?.

Private database:

I believe the user can see which apps are using his Cloud storage in his private area as he has to pay for this if it exceeds a certain amount. There must be a way to control this from the users perspective by shutting out an app if it exceeds the users expectations and the user doesn't want to pay for the storage.


Public database:

That's your nickel and you might have a problem here if many people use your app, use public storage and then delete the app. I added a search that deletes files older than 15 days (that 15 days is consistent with the expectations of users of the app). The search is run by all users when they access the public database so everyone contributes to the janitorial services.

"Private database: I believe the user can see which apps are using his Cloud storage in his private area as he has to pay for this if it exceeds a certain amount."

Your belief is unsupported by any details of how. Settings>AppleID>icloud>ManageStorage provides a way to manage file based app iCloud storage but not, as far as I can see, CloudKit Storage.


"There must be a way to control this from the users perspective by shutting out an app if it exceeds the users expectations and the user doesn't want to pay for the storage."


You'd think. Clearly I'm trying to find out what it is.


"Public database: That's your nickel..."

Is clearly irrelevant to the question.

> Settings>AppleID>icloud>ManageStorage provides a way to manage file based app iCloud storage but not, as far as I can see, CloudKit Storage.


Under Settings>AppleID>icloud there is a switch for each app. If that does not switch off the user's payment obligation under that app then Apple has misled the user. Therefore this switch most likely deletes the files since the files create that payment obligation. Test it and tell us how it works.


>How does my user manage storage. ...."Public database: That's your nickel..."... Is clearly irrelevant to the question.

Not "clearly irrelevant" to me. I'm sure you knew it was the private database you were using not the public database - but what you wrote does not make that clear. (By the way - check how your tone might be misinterpreted here! "clearly irrelevant" - indeed.)

"Under Settings>AppleID>icloud there is a switch for each app. If that does not switch off the user's payment obligation under that app then Apple has misled the user. Therefore this switch most likely deletes the files since the files create that payment obligation. Test it and tell us how it works."

A rather catagorical statement. I would interpret a modal switch as allowing the app to utilise iCloud storage from this device. Switching it off would hardly qualify as an instruction to delete existing cloud data the the extent that it would mislead the user if it did not.

Indeed, switching off the switch on Apple's notes app produced a response "Are you sure that you want to continue? "All iCloud notes will be removed from your iPhone, with a confirm button "Delete from my iPhone"

So that would strongly suggest that Apple do not consider that switch has a function of deleting data from iCloud or CloudKit.


"I'm sure you knew it was the private database you were using not the public database - but what you wrote does not make that clear."


Really. Note the text I have capitalised and italised below.

Allowing APP USERS to manage CloudKit storage


'How does MY USER manage storage"


I can find no way in settings for HIM to see how much iCloud storage my CloudKit app is using. So how does THE USER know and how can HE delete it.


This is clearly talking about the user managing and deleting storage. While the user may be able to delete individual records from the public database, he clearly cannot delete the public database itself.


I'm sure you are aware that the public database storage is not, by definition, manageable by the general app user....

I will ignore the tone in your response.


There is a significant issue regarding iCloud Storage - the cost involved. Managing that cost is important for developers and for users.


Let's talk about the public database (you can skip this section if you are not using the public database). It is very important to prevent users from adding files to the public database and then deleting their app. Their left-over files will cost the developer more and more money. Therefore, there must be a way of "managing the user's storage space taken up by files stored in the public database" - you might have referred to that as "allowing app users to manage storage". I described a method above. Please forgive me if I misinterpreted your original post.


Then there is the private database. Apple charges the user for their use of the private database. Apple must be providing some method of allowing the user to escape that payment obligation when they are done with the app. I suspect the way Apple does that is with that switch you found. But if the user doesn't have to pay for the private database storage any more, do you think Apple retains those records on their own nickel? I suspect not. But try it and tell us how it worked.


Good luck with your app!

Best practice for allowing app users to manage CloudKit storage
 
 
Q