在 Xcode 项目中找不到 Firebase 文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/41555351/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Firebase file not found in Xcode Project
提问by Matt Standley
All of a sudden my Firebase has stopped working within my Xcode project.
突然间,我的 Firebase 在我的 Xcode 项目中停止工作。
I am getting two errors. In my Viewcontroller.swift:
我收到两个错误。在我的 Viewcontroller.swift 中:
Could not build Objective-C module 'Firebase'
无法构建 Objective-C 模块“Firebase”
and in my Firebase.h file:
在我的 Firebase.h 文件中:
'FirebaseAnalytics/FirebaseAnalytics.h' file not found"
找不到“FirebaseAnalytics/FirebaseAnalytics.h”文件”
I think I know what the problem is but I do not know how to fix it. My FirebaseAnalytics/FirebaseAnalytics.h file is called FirebaseAnalytics/FirebaseAnalytics.h.icloud and I do not know how to remove the .icloud extension.
我想我知道问题是什么,但我不知道如何解决它。我的 FirebaseAnalytics/FirebaseAnalytics.h 文件名为 FirebaseAnalytics/FirebaseAnalytics.h.icloud,我不知道如何删除 .icloud 扩展名。
My framework looks like.
我的框架看起来像。
My pod file looks like
我的 pod 文件看起来像
So far I have tried: updating cocoapods and running pod install, and cleaning and rebuilding my project without any success.
到目前为止,我已经尝试过:更新 cocoapods 并运行 pod install,以及清理和重建我的项目,但没有任何成功。
Any tips or help is greatly appreciated.
非常感谢任何提示或帮助。
回答by Starlord
It looks like you are using iCloud Drive. A .iCloud extension means that iCloud have synced a placeholder file to you computer. A link to the original content stored in the cloud.
您似乎在使用 iCloud Drive。.iCloud 扩展名意味着 iCloud 已将占位符文件同步到您的计算机。指向存储在云中的原始内容的链接。
One scenario is that you tried to move a folder or the files to another location and this happened:
一种情况是您尝试将文件夹或文件移动到另一个位置,并且发生了这种情况:
Your original file is gone. It's gone from iCloud Drive, and it exists nowhere on your hard drive.
In their place, is a file named FILENAME.original-extension.icloud. This file, only a couple kilobytes in size, is the placeholder that OS X uses to pretend that the file existed on your system. Your original file is gone. It's gone from iCloud Drive, and it exists nowhere on your hard drive.
你的原始文件不见了。它从 iCloud Drive 中消失了,它在您的硬盘驱动器上无处存在。
取而代之的是一个名为 FILENAME.original-extension.icloud 的文件。这个文件只有几千字节大小,是 OS X 用来假装该文件存在于您的系统上的占位符。你的原始文件不见了。它从 iCloud Drive 中消失了,它在您的硬盘驱动器上无处存在。
Can OS X use them to download the originals from iCloud's servers?
OS X 可以使用它们从 iCloud 的服务器下载原件吗?
Nope, they are gone.
不,他们走了。
Though it can be possible to recover the files from iCloud by login into the web interfaceand go settingsand then click on data & security.
虽然可以通过登录Web 界面并转到设置然后单击数据和安全来从 iCloud 恢复文件。
If this is only pod module files related content, then I think you should delete your pod modules and install them again.
如果这只是与pod模块文件相关的内容,那么我认为您应该删除您的pod模块并重新安装它们。
I have found that using iCloud drive together with projects where a lot of files are dependent on each other are risky business. If you need backup of your files I suggest using a version control system like GitHub.
我发现将 iCloud 驱动器与大量文件相互依赖的项目一起使用是有风险的。如果您需要备份文件,我建议您使用 GitHub 等版本控制系统。
回答by Matt Standley
I was able to fix the problem with removing all pod 'Firebase' and pods that have to do with Firebase and re running pod install which removed them from my app. Then I added them back and ran pod install which reinstalled them and they no longer has the .icloud extension and no longer gave me an error message
我能够通过删除所有 pod 'Firebase' 和与 Firebase 相关的 pod 并重新运行 pod install 来解决这个问题,这将它们从我的应用程序中删除。然后我将它们添加回来并运行 pod install 重新安装它们,它们不再具有 .icloud 扩展名并且不再给我一条错误消息