objective c - Convert delegate to static function -


I am trying to develop evidence of a simple, one file concept code as follows: < pre> int main (int argc, const char * argv []) {NSString * requestString = @ "https://www.example.com"; NSURL * requestUrl = [NSURL URLWithString: requeststring]; NSURLRequest * Request = [NSRR request request with url: Request URL Cache Policy: NSURAEstLLodiingLocalaccount Data Timeout Interval: 10.0F]; NSURLConnection * connection = [[NSURLConnection alloc] initWithRequest: Request Rep: Self]; Return 0; }

The request from example.com uses a private CA from HTTPS, so I need to rely on that CA. In order to believe in CA, I need to add some code to NSURLConnectionDelegate --connection: didReiveiveAuthenticationChallenge:

issue me the problem of callback For NSURLConnection , and the only way I know how to do it is with another different object.

Is it possible to level the delegation in a stable work so that I can keep all the code in a file?

This is not possible what you are doing; NSKConnction should have an item as its representative, because it will have to send a specific message, from the representative protocol, can not respond to the task messages in that object. (There is no reason that you can not define your representative class in this file.)

There are some options for which you can find useful, and in this special case, you can use it

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -