我通过将行添加pod 'PaperTrailLumberjack'
到我的 Podfile 将 PaperTrailLumberjack 添加到我的项目中。
然后我运行pod install
命令并得到以下信息:
Analyzing dependencies
Downloading dependencies
Installing AFNetworking 2.1.0 (was 2.1.0)
Installing CocoaAsyncSocket (7.3.5)
Installing CocoaLumberjack (1.8.1)
Installing PaperTrailLumberjack (0.1.0)
Generating Pods project
Integrating client project
它似乎进展顺利,我也在我的 Pods 项目中获得了正确的目标。我也可以导入 DDLog.h
,甚至得到DDLogVerbose
智能感知建议的宏。
但是,当我编译我的项目时,我得到一个错误:
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_DDLog", referenced from:
objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我希望我只是忘记了一些愚蠢的事情,因为已经很晚了,而且我很累。但是 pod 目标的设置与 for 目标的设置相同AFNetworking
,并且工作正常。