通过CocoaPods更新Firebase后,我遇到了这个问题。
非常感谢您的帮助。
任何4.0.2以上的Firebase版本都会在Xcode(版本10.1)中引起相同的错误。
错误:
快速编译器错误
“字符串”文件
无法构建Objective-C模块“ CoreFoundation”
已经尝试:
清理项目
手动添加SDK
删除级别db并手动添加
问题出在哪里?使用Swift文件/标题?用leveldb?还是Firebase?
相关(在GitHub上类似的问题,但是那里建议的解决方案对我不起作用)
https://github.com/google/leveldb/issues/515
Xcode消息:
> <module-includes>:1:9: note: in file included from
> <module-includes>:1:
> #import "Headers/CoreFoundation.h"
> ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:10:
> note: in file included from
> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:43:
> #include <CoreFoundation/CFBase.h>
> ^ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:10:
> note: in file included from
> /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.1.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:72:
> #include <Block.h>
> ^ /Users/Besfort/Desktop/Coding/Xcode - projects/0.1/Pods/leveldb-library/table/Block.h:10:10: note: in file
> included from /Users/Besfort/Desktop/Coding/Xcode -
> projects/0.1/Pods/leveldb-library/table/Block.h:10:
> #include "leveldb/iterator.h"
> ^ /Users/Besfort/Desktop/Coding/Xcode - projects/0.1/Pods/leveldb-library/include/leveldb/iterator.h:18:10:
> note: in file included from /Users/Besfort/Desktop/Coding/Xcode -
> projects/0.1/Pods/leveldb-library/include/leveldb/iterator.h:18:
> #include "leveldb/slice.h"
> ^ /Users/Besfort/Desktop/Coding/Xcode - projects/0.1/Pods/leveldb-library/include/leveldb/slice.h:21:10:
> error: 'string' file not found
> #include <string>
> ^ <unknown>:0: error: could not build Objective-C module 'CoreFoundation'