I am working on an iOS App on Swift 4.0. The app uses an 3rd party SDK where there is a model lets say,
class Customer: NSCopying, NSObject {
var name: String!
var age: Int!
var address: Address!
}
At that point I have no control to modify any properties and signature for the model as its inside SDK. But I need to store the object in disk/user defaults and load when needed.
Is it possible? If it is then how can I do that?
One way is to use SwiftyJSON to convert the model object to JSON data:
Now you can do something like saving to
UserDefaults