I am getting connecting with restful web services, on login i get this session id.
"session":"86da8a2cb82ff46595bf2d8a57875e03"
After login once, this session id would be used to get the data from web services for other views of the application.
How can i make it global so that if there is change in session value global variable’s value also gets changed
If you want the session id to only last while the application is open you can use a global variable. If you want your session id to last longer you can store it in the user defaults.
example:
if you use
NSUserDefaultsremember to call[[NSUserDefaults standardUserDefaults] synchronize];when your app is about to exit.