views:

50

answers:

2

Hi, everyone.

I want to ask a questions about the canAuthenticateAgainstProtectionSpace and ddidReceiveAuthenticationChallenge. Are they private API iPhone application?

If yes, how can I modify it? And after I modify the private API of iPhone, will the iPhone reject my application?

If no, where should I put the modified code? I used to put the code within a .m file, but it did not work.

Thank you.

+1  A: 

They are both documented in Apples documentation here So they shouldn't be private. Usually finding private API's takes some investigative work and yes Apple will almost always reject an App if it uses a private API (There has been one case I have heard of that they let it through) but you shouldn't run into troubles with those ones.

Rudiger
thank you for your reply. How can I call the delegate method? I used to add a statement 'NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:request_get2 delegate:self];', request_get2 is NSHTTPURLRequest type. However, the above functions are called after the error message. Would you mind to help me to see about the code I wrote?
Questions
What error msgs are you getting? Are you building the request correctly and implementing all the NSURLConnection delegate methods like connection: didReceiveData and connectionDidFinishLoading? Also I've only ever used NSMutableURLRequest, haven't looked at NSHTTPURLRequest
Rudiger
thank you for your reply. This is the question about the NSHTTPURLRequest I asked and I also post the code and error in the post. If you feel free, please give me some comment. Thank you.
Questions
There are no errors in your original question other than "it did not work". Please put either some code or the error thats thrown to be able to help. Have a look at the demo code on the link above, it might help you with your own work
Rudiger
A: 

In addition to looking in the documentation for a method (if it's there it isn't private), you can also use App Scanner to search specifically for private API method signatures. It also allows you to scan your .app before submitting it to the review team.

Andrew