Remove deprecation warning when reading settings plist

This commit is contained in:
David Richardson
2024-07-03 09:05:32 -06:00
parent d1611bae12
commit 987da2b812
@@ -341,8 +341,15 @@ NSString * const XCCCappuccinoProjectLastEventIDKey = @"XCCCappuccinoPro
- (void)_writeSettings
{
NSData *data = [NSPropertyListSerialization dataFromPropertyList:self->settings format:NSPropertyListXMLFormat_v1_0 errorDescription:nil];
# pragma mark -- TODO
// Error should be handled with user interaction,
// although this hasn't previously been so either.
// Immedate concern is with removing noisy deprecation warnings.
NSError* error = nil;
NSData* data = [NSPropertyListSerialization dataWithPropertyList:self->settings format:NSPropertyListBinaryFormat_v1_0 options:0 error:&error];
if(data != nil){
NSLog(@"error %ld",(long)[error code]);
}
[data writeToFile:self.settingsPath atomically:YES];
}