objective c - Convert delegate to static function -
I am trying to develop evidence of a simple, one file concept code as follows: < pre> The request from issue me the problem of 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 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; }
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:
callback For NSURLConnection , and the only way I know how to do it is with another different object.
Comments
Post a Comment