r/iOSProgramming • • May 22 '20

Discussion iCloud Storage Cheat Sheet

Post image
255 Upvotes

15 comments sorted by

View all comments

Show parent comments

12

u/davedelong May 22 '20

The CloudKit usages aren’t correct. The private DB usages are dependent on how much space the user has available on their iCloud account, and the public DB is unlimited.

3

u/JaydenIrwin1 May 22 '20 edited May 22 '20

Yes you’re right about the private DB. But the public database scales with your # of users. https://developer.apple.com/icloud/cloudkit/

3

u/jtsakiris May 22 '20

Makes me wonder, what if you put things in the public DB but encrypt it with keys that are in the private DB?

1

u/mathocosta May 22 '20

You gonna need fetch 2 times, at public first and private after. And you can’t create CKReferences between records in different databases. But the usage stills the same

1

u/jtsakiris May 22 '20

More like fetch just at public, since the encryption key rarely change and can be fetched just after the app is installed (on second installation) or generated by the app and save a copy to the private DB (on first install).