I want to ask about how can i clear my app properties when i launch my mobile web app again i.e next time after closing last time. I dont know why but it is showing me different username in my login but the information according to that username and id is not fetched correctly. If its the problem that iam moving the username property from one window to another using Ti.App.Properties.setString() or something else.
2 Answers
For Titanium Mobile Web, Ti.App.Properties are stored in the browser's local storage. It's Mobile Web specific, but you could just access local storage directly and remove all the properties in one shot:
if (Ti.Platform.osname == 'mobileweb') { localStorage.removeItem('ti:properties'); }
If you want to clear properties, create a function that removes the property names on both startup and on the resume event if you need them cleared then too. Just like you can add properties, you can remove them too: http://docs.appcelerator.com/titanium/2.1/index.html#!/api/Titanium.App.Properties
Your Answer
Think you can help? Login to answer this question!