Subclassing Parse's PFUser in Swift

☆樱花仙子☆ 提交于 2019-12-05 10:11:39

Okay, solved my own problem here through trial and error. Essentially it looks like a cached logged in PFUser was causing problems. When Parse would initially load it was loading the logged in state from the emulator which was conflicting with the newly registered User subclass.

To fix this you can either:

  1. Restart the emulator.
  2. Call PFUser.logOut() right after Parse.setApplicationId() in AppDelegate to flush the cached user.

Hopefully this helps someone else out in the future!

I solved this issue by changing the initial view controller. It didn't register the user because it didn't go through the view controller that previously stated/identified who the user was.

What I did specifically:

  1. Set the initial view controller, for the controller that captures who the user is and then segue your way past to where you want to be.
  2. Restart the simulator.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!