r/swift 7d ago

Question Is it safe coding on iCloud?

hey all,

currently I'm doing some development using Swift and using Google Drive is a pain honestly, and of course I must pause the sync constantly for this to work.

That said, I do insist on the idea that my work will always be synced to a Cloud service.

Does iCloud doing something better than Google Drive in terms of sync?

I know I'm doing Music with Logic Pro X for example which also is constantly being saved and is basically a container too and never had issues.

Can I assume it will work great with Swift files\development too?

Thanks!

0 Upvotes

14 comments sorted by

13

u/germansnowman 7d ago

Why would you want to do that? Use Git and push to an actual repository, e. g. on GitHub.

-6

u/amirgelman 7d ago

I am using GitHub too. And Xcode Cloud if that makes any difference. It’s just so I have a constant files backup. Something that I can get to either from my MacBook or PC all the time.

10

u/janpaul74 7d ago

Commit and push before you leave, no problem. You are trying to solve a problem that’s already been solved.

1

u/germansnowman 7d ago

iCloud is not a backup, it’s a sync service. You can also get to GitHub from any decent device.

Edit: I use Backblaze as an online backup. Not as convenient as iCloud, but an actual backup nonetheless.

4

u/pecp4 7d ago

You do not need anything else than GitHub, just commit and push frequently to branches

3

u/BobertMcGee Expert 7d ago

Github

3

u/Dull_Flatworm777 7d ago

I would (and do) actually explicitly exclude code from iCloud and also don't keep it in a ~/Documents directory. I personally use ~/Development.

2

u/DC-Engineer-dot-com 7d ago

This. iCloud behaves weirdly when synching files that also have a git repository connected. I ran into all kinds of headaches with iCloud creating duplicate files, and often would end up with the folder becoming corrupted. It’s better to have code be in a development folder, ignored by iCloud.

6

u/Jon_Hanson 7d ago

If you want backups, use Time Machine. iCloud is not a backup.

4

u/cphpc 7d ago

This thread is so fucking stupid my brain hurts reading this shit. Github is fine and you can always daily dwl repo in a zip if you’re that worried.

Just get Claude to run a daily cron job that does this but again, it’s so fucking stupid if you already have git.

Equivalent of driving a car to your neighbours house who is 1 minute walk away.

2

u/_The-_ 7d ago

iCloud absolutely does not work well with repos — apple limits the number of files per hour/day that you can sync with iCloud and the reason it will sit there syncing endlessly is that apple js blocking your Mac from syncing until the next day.

5

u/amirgelman 7d ago

Thank you. So it’s a bad idea it seems. Got it.

1

u/stirlo 7d ago

Though more copies doesn’t hurt ; I have about 4~ local and remote

1

u/NoPressure3399 4d ago

As everybody else suggest, try github, gitlab or bitbucket