r/iOSProgramming • • May 22 '20

Discussion iCloud Storage Cheat Sheet

Post image
255 Upvotes

15 comments sorted by

15

u/JaydenIrwin1 May 22 '20

I haven't seen a comprehensive summary online, so here. Let me know if I made any errors.

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).

4

u/wmfcwm May 22 '20

CloudKit containers can be accessed from ALL of your apps, I.e. all apps created from same developer account can share the same container.

2

u/JaydenIrwin1 May 22 '20

Oh true, I meant to add that!

1

u/flatheadcatfish May 22 '20

I think it would be more effective to add explanation to these “cheats”, if you’re going to turn code into an image.

1

u/JaydenIrwin1 May 22 '20

Yeah I guess “cheat” is not the best word. It’s more like a summary of the options available.

3

u/[deleted] May 22 '20

Note on watchOS we can’t access/set iCloud key values ...

2

u/count_Der3k May 22 '20

This was amazing! Thanks for sharing!!

2

u/[deleted] May 22 '20

Love the cheat sheet. Thanks keep sharing more.

2

u/fuzunspm May 22 '20

It’s not hidden from user. They can see via macOS within Library folders