JustWork
JustWork

Reputation: 1964

SDWebImage on iOS 8.1 weird compile error

When I try to run project on real device (iPhone 5 and 5S with iOS 8.1) I get following compiler errors:

// ARC Semantic Issue - myPath/SDWebImage/UIImage+GIF.m:26:42: No visible @interface for 'UIImage' declares the selector 'initWithData:'
animatedImage = [[UIImage alloc] initWithData:data];

// ARC Semantic Issue - myPath/SDWebImage/UIImage+GIF.m:47:34: No known class method for selector 'animatedImageWithImages:duration:'
animatedImage = [UIImage animatedImageWithImages:images duration:duration];

// ARC Semantic Issue - myPath/SDWebImage/UIImage+GIF.m:155:21: No known class method for selector 'animatedImageWithImages:duration:'
return [UIImage animatedImageWithImages:scaledImages duration:self.duration];

My project was working normally until this morning. I changed nothing, just tried to debug on real device. The strangest part of that is I can run/debug on emulator (on any iPhone device with iOS 8) without any error.

When I downgrade deployment target from 8.1 to 8, XCode can successfully build and run the project for emulator and real device.

I tried completely removing SDWebImage and adding it back but didn't solve the problem.

I am using XCode 6.1 (Swift) and iOS 8.1 SDK on my project.

What might be causing the problem that suddenly appeared?

Upvotes: 2

Views: 674

Answers (1)

TahoeWolverine
TahoeWolverine

Reputation: 1744

As has been said on other questions, the new "ModuleCache" directory within DerivedData has been responsible for many of these problems.

Here's the path:

/Users/[user]/Library/Developer/Xcode/DerivedData/ModuleCache

Simply delete the module cache, or the entire derived data directory as many have been doing on a daily basis for the last few iOS SDK iterations.

I came here looking for a different answer to a similar problem since this solution isn't fixing my current problem, but I figured I would share this as it will fix many of these.

Upvotes: 2

Related Questions