MakeSchool-Tutorials / Makestagram-Swift-V3

14 stars 7 forks source link

Change NSKeyedArchiver to Encoding/Decoding #93

Closed ocwang closed 6 years ago

ocwang commented 6 years ago

Should eventually convert the code that stores user data in UserDefaults from using NSKeyedArchiver to instead use the Encoding/Decoding protocols. This would get rid of having to subclass NSObject and refactor the code to be more swifty.

Tried implementing this previously, but ran into a bug where the user data sporadically wasn't being saved in UserDefaults. Some info I found on Stackoverflow suggested this might be an issue with simulator but didn't have time to test/debug further.

dionlarson commented 6 years ago

Fixed in https://github.com/MakeSchool-Tutorials/Makestagram-Swift-V3/commit/44ae51e212e14fd9ebea7cdf296d5aa3877fa858