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
Post a Comment