diff --git a/native/ios/Comm.xcodeproj/project.pbxproj b/native/ios/Comm.xcodeproj/project.pbxproj --- a/native/ios/Comm.xcodeproj/project.pbxproj +++ b/native/ios/Comm.xcodeproj/project.pbxproj @@ -212,6 +212,7 @@ CB64AA75284F4DC900460699 /* ThreadOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadOperations.h; path = ../PersistentStorageUtilities/ThreadOperationsUtilities/ThreadOperations.h; sourceTree = ""; }; CBEA4A88286EEC9100DFCFF5 /* NonBlockingLock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NonBlockingLock.h; path = Comm/TemporalMessageStorage/NonBlockingLock.h; sourceTree = ""; }; CBEA4A89286EECCC00DFCFF5 /* NonBlockingLock.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = NonBlockingLock.mm; path = Comm/TemporalMessageStorage/NonBlockingLock.mm; sourceTree = ""; }; + CBEA4A8C286EED3900DFCFF5 /* EncryptedFileUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EncryptedFileUtils.h; path = Comm/TemporalMessageStorage/EncryptedFileUtils.h; sourceTree = ""; }; F53DA7B3F26C2798DCE74A94 /* Pods-Comm.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Comm.debug.xcconfig"; path = "Target Support Files/Pods-Comm/Pods-Comm.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -563,6 +564,7 @@ CBEA4A87286EEC7600DFCFF5 /* TemporalMessageStorage */ = { isa = PBXGroup; children = ( + CBEA4A8C286EED3900DFCFF5 /* EncryptedFileUtils.h */, CBEA4A89286EECCC00DFCFF5 /* NonBlockingLock.mm */, CBEA4A88286EEC9100DFCFF5 /* NonBlockingLock.h */, ); diff --git a/native/ios/Comm/TemporalMessageStorage/EncryptedFileUtils.h b/native/ios/Comm/TemporalMessageStorage/EncryptedFileUtils.h new file mode 100644 --- /dev/null +++ b/native/ios/Comm/TemporalMessageStorage/EncryptedFileUtils.h @@ -0,0 +1,14 @@ +#import + +NSString *const encryptedDataSeparator = @"\n"; + +@interface EncryptedFileUtils : NSObject ++ (void)writeData:(NSString *)data + toFileAtPath:(NSString *)path + error:(NSError **)err; ++ (void)appendData:(NSString *)data + toFileAtPath:(NSString *)path + error:(NSError **)err; ++ (NSString *)readFromFileAtPath:(NSString *)path error:(NSError **)err; ++ (void)clearContentAtPath:(NSString *)path error:(NSError **)err; +@end