iOS Swift + Parse.com - user authentication best practices -


i love know if there best practices out there prevent me future frustration when comes user authentication parse.com in swift projects.

i have handful of views not function without logged in user. current methodology has been use viewwillappear redirect non-loggedin users login page simple as

override func viewwillappear(animated: bool) {     if (pfuser.currentuser() == nil) {             self.navigationcontroller?.poptorootviewcontrolleranimated(true)          presentviewcontroller(alert, animated: true, completion: nil     } else {         // (...code...) } 

but parse 209 error : invalid session token when somehow login user in ios simulator parse doesn't recognize user current user on server side. i'd love know if i'm following solid conventions or making weird workarounds causing externalities.

a few comments:


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -