Is it possible to write a UIView to disk using NSSecureCoding. The below code results in an error.
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:object requiringSecureCoding:YES error:&error];
Error: The data couldn’t be written because it isn’t in the correct format.
We also tried the following:
NSMutableData *data = [NSMutableData data];
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initRequiringSecureCoding:YES];
[archiver encodeObject:view forKey:@"view"];
[archiver finishEncoding];
Error: This decoder will only decode classes that adopt NSSecureCoding. Class 'UIView' does not adopt it.