Search code examples
xcodemacoscocoapods

Mac iCloud alters Xcode Pods breaking my build


Every couple days to couple weeks I am unable to build my project because Xcode states

"Use of unresolved identifier 'Fabric'

This also happens with Crashlytics

Now I've narrowed the bug down to some situation in my Pod Folder. To initially fix this I have to delete both Fabric and Crashlytics from the Pod file. Then do a pod install/update.

So the cause of this is, right beside my Fabric and Crashlytics folders there is a little cloud icon. I assume this is iCloud and it is changing my folders at what appears to be random intervals. How can I unhook these folders from the iCloud?

Or stop iCloud from breaking these folders/pods?


I found the meaning of this icon

It means that the file is stored only in the cloud and not on your computer.

Not sure why this behaviour is active on only these two pods.


New Update, I swear this failed before but clicking the cloud downloaded the file from the cloud for me and allowed me to build.


Solution

  • Edit: Add an empty file called .nosync and iCloud will ignore that directory and all of its subdirectories.

    It seems like you're syncing your desktop and documents folders with iCloud Drive. The easiest way would be to move your Xcode project to another directory.

    Maybe look into iCloud having an ignore list that makes it omit certain files.

    You can also add pre-build actions to delete and redownload your pods in the scheme editor menu. This GitHub Repo explains what I'm talking about.