1
votes

I just updated to Xcode 6 and got an warning message that I cannot solve. I have been searching for an answer for hours, but no luck. The warning and the code line are below. Has anyone else had this problem?

Warning

Implicit conversion from enumeration type 'enum NSURLCacheStoragePolicy' to different enumeration type 'NSURLRequestCachePolicy' (aka 'enum NSURLRequestCachePolicy')

Code

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:geocodeUrl] cachePolicy:NSURLCacheStorageAllowed timeoutInterval:10.0];
1

1 Answers

6
votes

Docs say cachePolicy: should be one of NSURLRequestUseProtocolCachePolicy, NSURLRequestReloadIgnoringLocalCacheData, NSURLRequestReturnCacheDataElseLoad, or NSURLRequestReturnCacheDataDontLoad. The value you're passing to it is defined for responses rather than requests.