I have a client which is asking different behaviours on a user logging in for first time or it is logging in for second time.. If the user login for the first time the view should be a login view where users put its username and password and second time it should not ask for username and password. I stored the username and password in app properties but then it is never showing the login view even after a clean build. Any help on how can i acheive this..Sorry if it is a trivial thing..Thanks in advance.
3 Answers
can you provide some sample code, because the approach you have outlined seems like it should be working?
in app.js
var userName = Ti.App.Properties.getString('username'); alert(userName);// **shows the user name even after clean build** //construct UI if(userName ==''){ Ti.include('ui/common/LoginView.js'); } else { Ti.include('ui/common/View2.js'); }in LoginView
Ti.App.Properties.setString('username', loginField.value); Ti.App.Properties.setString('password', passwordField.value)
I stored the username and password in app properties but then it is never showing the login view even after a clean build.
App properties are not removed after a clean build. Only after an app uninstall.
Your Answer
Think you can help? Login to answer this question!