Analysis finds private API usage although I've changed that code
My app was rejected after App Store review for using the private method -[UIImage initWithData:cache:], but this is my code :
NSData *imageData = [NSData dataWithContentsOfURL:[NSURL URLWithString:[details image]]]; picture = [[UIImage alloc] initWithData:imageData];
An earlier version of the app I submitted did contain an initWithData:cache: call, but I removed this before resubmitting. Is it possible I need to clean the build? Is the build somehow "remembering" the old code?
All the functions you used in that snippet have public documentation, so it would be worth complaining to Apple and demanding clarification. Here are the links to the documentation for each of those, BTW:
Note that Apple's message refers to the "initWithData:cache:", however, the snippet you provided refers to "initWithData:". Are you sure that the code you've provided is what was referred to by Apple?
(Copied out from an edit to the question by the OP.)
I resolved this by creating a completely new project and copying files across from old project. It looks like something was ghosting from when the project did contain the initWithData:cache: method.