4

I have a swift project, in which I have referenced SDWebImage via CocoaPods v0.36.0.beta.2. My project targets ios 8.0+, and my Podfile declares platform :ios, '8.0'.

However, when I hit a breakpoint in my application and attempt to execute any po command in the lldb console, I get the following error:

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.

How can I convince SDWebImageCompat.h that I'm targeting a version higher than 5.0?

Albert Bori
  • 9,832
  • 10
  • 51
  • 78
  • 1
    Any luck? facing same trouble – BaSha Mar 05 '15 at 13:35
  • 1
    I've just been manually removing the offending lines in `SDWebImageCompat.h` and then recompiling the project every time I need to use `po`. I'm not sure how to force the compiler see that I'm targeting iOS 8.0... – Albert Bori Mar 05 '15 at 16:56

1 Answers1

7

It's a little late but just ran into this issue with a library I added through cocoapods. I solved it by searching the project for "IPHONEOS_DEPLOYMENT_TARGET" and saw that my sdwebimage was compiling at 4.3 for some reason. Changing this got it to work for me.

Hope it helps someone!

Jeremy
  • 241
  • 4
  • 17