I am going to use AFNetworking 3.0
.
On my first view when i enter mobile number and click on submit button then it send to server and get response from server, in that response, suppose i get 2 parameters ( like id:xx, token:xxxxx,).
Now my question is-
When i get response from server then i want to go on 2nd view and when i click on login button,I want to send only token which i got from previous response(not id).How can i take only that token from previous view and send it from current view.
I tried like this,but it not completed or not working. I tried to save response data like this:
NSString *str = [[NSString alloc] initWithData:responseObject encoding:NSUTF8StringEncoding];
NSLog(@"responseData: %@", str);
and tried to send on 2nd view:
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([[segue identifier]isEqualToString:@"loginsegue"])
{
loginViewController *lvc= [segue destinationViewController];
lvc.str=_str;
}
}