ios - Swift - How to implement a login/session (no code) -


my application has login page , keep user logged-in when closes app. also, have logout button should log-out user , display login page (even when closes app).

i tried implement using core data, have issues , i'm not sure best way it.

can please give me advices? don't need code idea of how can implement please.

thanks!

you can make simple or complicated like. simple bool value in nsuserdefaults it. persist state in coredata, filesystem, nsuserdefaults. store login credentials securely in keychain.

for authenticated areas of app, check state have persisted on next app launch.

on logout, remove state have stored.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -