我有一个快速的项目,我通过CocoaPods v0.36.0.beta.2引用了SDWebImage。我的项目目标是ios 8.0+,我的Podfile声明platform :ios, '8.0'
。
但是,当我在我的应用程序中遇到断点并尝试在po
控制台中执行任何lldb
命令时,我收到以下错误:
error: Error in auto-import:
failed to get module 'AutomationTests' from AST context:
/Users/me/Library/Developer/Xcode/DerivedData/MyProject-ecinfzhnelbxxegrpzcpwnezmvot/Build/Products/QA-iphonesimulator/Pods/SDWebImage.framework/Headers/Pods-SDWebImage-umbrella.h:4:9: note: in file included from /Users/me/Library/Developer/Xcode/DerivedData/MyProject-ecinfzhnelbxxegrpzcpwnezmvot/Build/Products/QA-iphonesimulator/Pods/SDWebImage.framework/Headers/Pods-SDWebImage-umbrella.h:4:
#import "SDImageCache.h"
^
/Users/me/Library/Developer/Xcode/DerivedData/MyProject-ecinfzhnelbxxegrpzcpwnezmvot/Build/Products/QA-iphonesimulator/Pods/SDWebImage.framework/Headers/SDImageCache.h:10:9: note: in file included from /Users/me/Library/Developer/Xcode/DerivedData/MyProject-ecinfzhnelbxxegrpzcpwnezmvot/Build/Products/QA-iphonesimulator/Pods/SDWebImage.framework/Headers/SDImageCache.h:10:
#import "SDWebImageCompat.h"
^
/Users/me/Library/Developer/Xcode/DerivedData/MyProject-ecinfzhnelbxxegrpzcpwnezmvot/Build/Products/QA-iphonesimulator/Pods/SDWebImage.framework/Headers/SDWebImageCompat.h:17:2: error: SDWebImage doesn't support Deployement Target version < 5.0
#error SDWebImage doesn't support Deployement Target version < 5.0
^
could not build Objective-C module 'SDWebImage'A fatal parse error has occurred. LLDB may become unstable; please restart your debug session as soon as possible.
如何说服SDWebImageCompat.h
我定位的版本高于5.0?
答案 0 :(得分:7)
现在有点晚了,但我刚刚通过cocoapods添加了一个库,遇到了这个问题。我通过在项目中搜索&#34; IPHONEOS_DEPLOYMENT_TARGET&#34;并且看到我的sdwebimage由于某种原因在4.3编译。改变它让它对我有用。
希望它有所帮助!