警告存在于Firebase 3.6.0中。Xcode 8- Swift 3.
以下是Firebase类:
@class FIROptions
@class FIRAuthCredential
@class FIRUserProfileChangeRequest
警告消息:
初始化NS_UNAVAILABLE;的
我想这可能是个bug!
但是如果没有,你有什么办法来修复它吗?
发布于 2016-10-07 21:44:52
原始答案:这个问题已经在最新的Firebase (3.7.1)版本中修复了。只需做一个"pod update Firebase“,然后清理你的项目(通过Option键清理构建文件夹,只是为了确保)。
更新了答案:不,是我的错...这个问题对我来说也仍然存在。
深入挖掘,这里有一个很好的解释:https://stackoverflow.com/a/39233507/3638762
在此期间(因为我对提高你的期望感到很糟糕),我找到了一种很好的方法来抑制警告。我不得不猜测-Wnullability警告类型。;-)
在Pods/FirebaseCore/Frameworks/FirebaseCore.framework/Headers/FIRApp.h:中的违规行周围添加以下三个#杂注行
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnullability"
- (nullable instancetype)init NS_UNAVAILABLE;
#pragma clang diagnostic pop
干杯!
发布于 2017-01-03 21:13:13
下面是针对iOS Developer的解决方案构建设置、->代码签名、Identity ->更改、调试和发布。
发布于 2016-09-23 12:17:18
在等待Firebase团队解决此错误时,您可以考虑将Build Settings
中的Swift Optimization Level
更改为None
。
请注意,这是一种临时解决方法。请在Firebase发布修复后将其切换回Fast, Whole Module Optimization
。
https://stackoverflow.com/questions/39564164
复制相似问题