iphone - ios - How to declare setToken method? -
i'm trying access token google,yahoo.but i'm getting error wacloudaccesscontrolclient may not respond settoken.how declare settoken method here.
-(bool)webview:(uiwebview *)webview shouldstartloadwithrequest:(nsurlrequest *)request navigationtype:(uiwebviewnavigationtype)navigationtype { if(_url) { /* make call re-entrant when re-load content ourselves */ if([_url isequal:[request url]]) { return yes; } [_url release]; } _url = [[request url] retain]; nsstring* scheme = [_url scheme]; if([scheme isequaltostring:@"acs"]) { // parse json url parameter dictionary nsdictionary* pairs = [self parsepairs:[_url absolutestring]]; if(pairs) { wacloudaccesstoken* accesstoken; accesstoken = [[wacloudaccesstoken alloc] initwithdictionary:pairs]; [wacloudaccesscontrolclient settoken:accesstoken]; [self dismissmodalviewcontrolleranimated:yes]; } return no; } [nsurlconnection connectionwithrequest:request delegate:self]; return no; } any ideas? in advance.
you need pass message object not class name first reference object.
i'm not sure usecase, @ wacloudaccesscontrolclient api have init or ...with... methods create or reference object of class.
this:
[wacloudaccesscontrolclient settoken:accesstoken]; should (the init... method made up, please replace actual one):
[[wacloudaccesscontrolclient initsomethingsomehow] settoken:accesstoken]; are after this?:
[[wacloudaccesscontrolclient accesscontrolclientfornamespace:@“namespace-name” realm:@“realm-name”] settoken:accesstoken]; edit:
have @ example of how interact wa toolkit ios i've skimmed through seems have answers looking for.
Comments
Post a Comment