Does iPhone has mechanism like windows registry to store the state of the application?
How generally you save the state of the application when user exit from the application?
Use 'properties' which get stored in between launches of an app.
to store a value as a property called 'some_property' :
then to get the value again:
var theStoredValue = Ti.App.Properties.getString('some_property');