I want to be able to copy a custom class in Swift. So far, so good. In Objective-C I just had to implement the NSCopying protocol, which means implementing
NSCopying
Only if you are using ObjectMapper library : do like this
let groupOriginal = Group(name:"Abc",type:"Public") let groupCopy = Mapper().mapAny(group.toJSON())! //where Group is Mapable