views:

241

answers:

3

Hi,

In my app, I am using the following undocumented feature:

UIAlertView *alertView;

[alertView addTextFieldWithValue:@""label:@""];
UITextField *textField = [alertView textFieldAtIndex:0];

Is it ok to use to have my application approved for distribution? Or I should replace this code?

+3  A: 

There's always a risk you'll be rejected when you use an undocumented feature. If you know how to do it in a documented way, do so and save yourself the sleepless nights.

"Applications may only use Published APIs in the manner prescribed by Apple and must not use or call any unpublished or private APIs."

How did you stumble across something undocumented, by the way?

Nosredna
class-dump is your friend :)
rpetrich
+1  A: 

I've read where other developers have been hit pretty hard by Apple for doing just this. Look for another documented way to do what you need.

Chris Porter
+1  A: 

Will reject for sure. My app has just been rejected because of this.

Aleks N.