When using Xcode 4.3, a warning message is raised because of the overridden methods in the category on NSCachedURLResponse.
We've written a simple wrapper instead which conforms to the NSCoding and NSCopying protocols and does not use categories. From our limited testing the approach seems to work and alleviates the error.
[fix] category warnings in xcode 4.3 by using wrapper SDCachedURLResp…
…onse instead of NSCachedURLResponse category smashing
After looking over diff a bit closer I noticed some company code. Let me isolate the fix first.
[fix] remove proprietary code
OK, removed the proprietary naming scheme so should be all ready to go. We included some other small fixes for code clarity, etc.
[fix] extraneous log statement
Is this related to the warning fix?
No, was just some internal cleanup we did. Seems to increase readability?
Interesting change, could you split it to another pull request please?
Certainly, this is (obviously) not necessary to remedy the issue.
And upon further consideration, this change looks somewhat illegitimate. Removing it...
[slice] cache control search into separate commit
Re-added "lowercaseString" code in most recent commit
[fix] issue with legacy SDURLCache archives
The recent commit fixes an error as described below:
The removal of the NSCachedURLResponse category means that NSKeyedArchiver will throw an EXC_BAD_ACCESS when attempting to load NSCachedURLResponse data. This means that this change requires a cache refresh, and a new cache key namespace that will prevent this from happening. Old cache keys will eventually be evicted from the system as new keys are populated.
Fix SDURLCache with iOS 5+ (fix #30, #29)
- Disable SDURLCache at runtime if iOS version is >5 as this version
now includes disk caching support
- Exchange category with a wrapper to add NSCoder protocol support