LookinCustomAttrModification.m 881 B

12345678910111213141516171819202122232425262728293031323334
  1. #ifdef SHOULD_COMPILE_LOOKIN_SERVER
  2. //
  3. // LookinCustomAttrModification.m
  4. // LookinShared
  5. //
  6. // Created by likaimacbookhome on 2023/11/4.
  7. //
  8. #import "LookinCustomAttrModification.h"
  9. @implementation LookinCustomAttrModification
  10. - (void)encodeWithCoder:(NSCoder *)aCoder {
  11. [aCoder encodeInteger:self.attrType forKey:@"attrType"];
  12. [aCoder encodeObject:self.value forKey:@"value"];
  13. [aCoder encodeObject:self.customSetterID forKey:@"customSetterID"];
  14. }
  15. - (instancetype)initWithCoder:(NSCoder *)aDecoder {
  16. if (self = [super init]) {
  17. self.attrType = [aDecoder decodeIntegerForKey:@"attrType"];
  18. self.value = [aDecoder decodeObjectForKey:@"value"];
  19. self.customSetterID = [aDecoder decodeObjectForKey:@"customSetterID"];
  20. }
  21. return self;
  22. }
  23. + (BOOL)supportsSecureCoding {
  24. return YES;
  25. }
  26. @end
  27. #endif /* SHOULD_COMPILE_LOOKIN_SERVER */