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?

Answers


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:

  1. NSURL URLWithString
  2. NSData dataWithContentsOfURL
  3. UIImage initWithData

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.


Need Your Help

Entering text in website textbox using c#

c# web automation

I am trying to automate fill the textbox of a website in c# and i used:

How to change preloading function?

jquery image loading image-preloader

I need help with the code on my site, http://www.luischales.com/miami-quinces-photography.html . the first time you open it the slide don't start until all images are loaded (i think), and clients ...