My current class has around 50 lines just encoding and decoding variables in order for my class to be NSUserDefaults compatible. Is there a better way to handle this?
Look at protocol codeable in Swift 4.
protocol codeable
The decoder and encoder will be auto-generated for you.
Check out: (starting about half way through) https://developer.apple.com/videos/play/wwdc2017/212/