ios - X-Auth-Token Invalid After 1 Session -


i'm developing ios app in xcode , using afnetworking talk api - api uses "x-auth-token". when log in , store session token in user defaults, works until app restarted - session token doesn't work reason?

the token used in afnetworking so:

nsmutabledictionary *params = [[nsmutabledictionary alloc] init]; [params setvalue:@"sessiontokenfromuserdefaults" forkey:@"x-auth-token"]; 

does have advice? (ps: error afn when using token after restarting is: request failed: unauthorized (401)

how acheive without logging in each session?

thanks lot!

i remember having sort of problems using nsurlconnections without cache policy. think there thread here might help.


Comments

Popular posts from this blog

java - Incorrect order of records in M-M relationship in hibernate -

command line - Use qwinsta in PowerShell ISE -

php - I want to create a website for polls/survey like this http://www.poll-maker.com/ -