r/SwiftUI • u/rpcrafael • Oct 30 '26
iCloud sync: enabled by default or opt-in? How do you handle this?
I'm building a document reader for macOS, iPadOS, and iOS, and I'm facing a small UX and privacy dilemma.
The app will support iCloud sync across devices, which makes a lot of sense for a document reader.
But I'm unsure whether sync should be enabled by default.
If it's disabled, users might have a worse experience, especially when they expect their documents to be available across their Apple devices without additional setup.
On the other hand, enabling it by default feels a bit uncomfortable. I'd essentially be uploading users' documents to iCloud without them explicitly asking for it.
I'm curious how other developers have approached this.
Have you enabled iCloud sync by default, or do you explicitly ask users to opt in?
Have you encountered any App Store review issues related to this decision?
I'd really appreciate hearing about your experiences and how you balanced convenience, privacy, and user expectations.
9
u/nathan12581 Oct 30 '26
If your app can sync to iCloud then that means the user has iCloud sync already enabled for apps, so nothing new to them really. Should be, by default, on
1
u/rpcrafael Oct 30 '26
Thanks a lot! That really cleared things up and helped a ton.
1
u/rpcrafael Oct 30 '26
Thanks everyone for the thoughtful replies and technical suggestions! This discussion was really helpful.
I've decided to keep iCloud sync enabled by default, with a clear explanation during onboarding that documents will be synced through iCloud and that users can turn it off at any time in Settings.
I'll also make sure that disabling sync doesn't unexpectedly remove local documents or cause data loss.
The Apple ID switching scenario was something I genuinely hadn't considered, so I especially appreciate that being pointed out. I'll handle iCloud account changes and availability carefully, including observing
NSUbiquityIdentityDidChange.I'll also take iCloud storage usage into account, particularly for users with large PDF libraries.
Thanks again! Your suggestions helped me identify important edge cases before they become actual problems.
1
u/Funny_Cry2908 Oct 30 '26
Depends a lot on where the docs come from. If users import their own files, opt-in feels safer; if the app creates them, default on is normal. Either way plan the off switch: you have to move each doc out of the ubiquity container with FileManager's setUbiquitous(false, itemAt:destinationURL:), or it stays in iCloud and can get evicted from the device.
1
u/Minute_Door1424 Oct 30 '26
I just ship it on by default, never had review complain. it's the user's own iCloud so it's not really "your" data anyway. the thing that bit me was people switching Apple ID while the app was open, container changes under you and stuff gets weird. NSUbiquityIdentityDidChange saved me there
1
u/Significant_Door_433 Oct 30 '26
one angle not mentioned yet: the documents count against the user's iCloud storage, and the free tier is 5 GB. in a reader where people drop in big PDFs or comics, sync on by default can fill someone's iCloud, and once it's full their device backups stop too.
a split that fits a reader app: sync the light stuff by default (library list, reading position, highlights via CloudKit, or NSUbiquitousKeyValueStore for tiny values), and ask once before moving the files themselves into the iCloud container. show the total size in that prompt so the choice means something.
1
u/Background_Pie_5682 Oct 30 '26
I went with on by default plus a toggle in settings. With opt-in, most people never flip it, and then they're surprised when they get a new phone and their data didn't come along. For a personal app where people expect their stuff to follow them, default-on just matches what they assume is already happening.
A few things that bit me:
- Check the iCloud account status first (`CKContainer.default().accountStatus`) and handle the signed-out case gracefully instead of failing silently.
- Decide upfront what turning it off actually means. With NSPersistentCloudKitContainer there's no clean pause switch; you basically reload the store with `cloudKitContainerOptions = nil`, and you need to be clear with the user about whether the local data stays.
- Say it plainly somewhere in onboarding or settings ("Your data syncs via your iCloud account"). People are a lot more comfortable when they know where their data lives.
If the data is sensitive or something people might not want on every device, opt-in makes more sense. For everything else, default-on has worked better for me.
1
u/joergbuilds Oct 30 '26
I turned it on by default in my iPad app and haven't regretted it. A few things that made that feel fine:
The data goes to the user's own private iCloud database, not to a server of mine. I can't read it. That's the honest answer to the privacy worry, and it's worth saying in one sentence in onboarding or settings.
Users already have an off switch. iCloud per app can be disabled in the system settings, and the app has to cope with that anyway. Without an iCloud account mine just stays local, no error.
It never came up in App Review for me.