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

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -