1

Per the SDWebImage about SDWebImage 3 supports iOS 5.0 ("The version 3.0 of SDWebImage isn't fully backward compatible with 2.0 and requires iOS 5.0 minimum deployement version").

However, I am having issues compiling it. I added it with Cocoapods to my iOS 5.1 project.

I am getting a compiling error complaining about the subscript syntax, it can be resolved by adding a category to NSObject to have subscripts in the .pch file, as suggested by Jeff Wolski here.

The specific error is

Expected method to read array element not found on object of type 'NSArray *'

It is having that compile error in multiple places, one example is in SDImageCache.m, in the initWithNamespace method:

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); _diskCachePath = [paths[0] stringByAppendingPathComponent:fullNamespace];

While I am able to compile using Jeff Woski solution, I am concerned that SDWebImage 3 doesn't really support iOS 5.x and while it compiles I might have further issues in runtime.

Does SDWebImage 3 support iOS 5.x? Is there another way to fix the compiling issue?

Thanks.

Community
  • 1
  • 1
rufo
  • 5,158
  • 2
  • 36
  • 47

1 Answers1

0

For anyone that might come looking for this information. The solution from Jeff Wolski seems to be appropriate. I have been using it extensively and it doesn't seem to have any issue because of that.

Update:

Please note that the base-sdk of the App wasn't iOS 6.0. The deployment target can be iOS 5.0, but the SDK must be 6.0 for it to work.

Using the proper base-sdk it is not necessary to do any workaround.

rufo
  • 5,158
  • 2
  • 36
  • 47