diff --git a/Privitty.framework/Privitty b/Privitty.framework.zip similarity index 69% rename from Privitty.framework/Privitty rename to Privitty.framework.zip index c96320030..2d577f511 100644 Binary files a/Privitty.framework/Privitty and b/Privitty.framework.zip differ diff --git a/Privitty.framework/Headers/Privitty.h b/Privitty.framework/Headers/Privitty.h deleted file mode 100644 index cc8a19cf6..000000000 --- a/Privitty.framework/Headers/Privitty.h +++ /dev/null @@ -1,224 +0,0 @@ -// -// Privitty.h -// Privitty Framework -// -// Copyright (c) 2024 Alanring Technologies Pvt. Ltd. -// - -#import - -//! Project version number for Privitty. -FOUNDATION_EXPORT double PrivittyVersionNumber; - -//! Project version string for Privitty. -FOUNDATION_EXPORT const unsigned char PrivittyVersionString[]; - -/** - * Complete Objective-C API for Privitty Core - * All methods match the JNI interface for Android - * - * NULLABILITY NOTES: - * - Initializers can return nil on failure - * - Methods returning NSDictionary/NSString can return nil on error - * - This matches Android JNI behavior where jstring can be NULL - */ -@interface PrivittyCore : NSObject - -// ============================================================================= -// INITIALIZATION & LIFECYCLE -// ============================================================================= - -- (nullable instancetype)initWithBaseDirectory:(NSString*)baseDirectory; -- (nullable instancetype)init; -- (BOOL)initialize; -- (BOOL)isInitialized; -- (void)shutdown; - -// ============================================================================= -// SYSTEM STATUS -// ============================================================================= - -- (nullable NSDictionary*)getSystemStatus; -- (nullable NSDictionary*)getHealthStatus; -- (nullable NSDictionary*)getVersion; - -// ============================================================================= -// PEER MANAGEMENT -// ============================================================================= - -- (nullable NSDictionary*)createPeerAddRequestWithChatId:(NSString*)chatId - peerName:(NSString*)peerName - peerEmail:(nullable NSString*)peerEmail - peerId:(nullable NSString*)peerId; - -- (nullable NSDictionary*)processPeerAddResponseWithChatId:(NSString*)chatId - peerId:(NSString*)peerId - accepted:(BOOL)accepted - rejectionReason:(nullable NSString*)rejectionReason; - -// ============================================================================= -// FILE OPERATIONS -// ============================================================================= - -- (nullable NSDictionary*)processFileEncryptRequestWithFilePath:(NSString*)filePath - chatId:(NSString*)chatId - allowDownload:(BOOL)allowDownload - allowForward:(BOOL)allowForward - accessTime:(NSInteger)accessTime; - -- (nullable NSDictionary*)processFileDecryptRequestWithPrvFile:(NSString*)prvFile - chatId:(NSString*)chatId; - -- (nullable NSDictionary*)getFileAccessStatusWithChatId:(NSString*)chatId - filePath:(NSString*)filePath; - -// ============================================================================= -// ACCESS CONTROL -// ============================================================================= - -- (nullable NSDictionary*)processInitAccessGrantRequestWithChatId:(NSString*)chatId - filePath:(NSString*)filePath; - -- (nullable NSDictionary*)processInitAccessRevokeRequestWithChatId:(NSString*)chatId - filePath:(NSString*)filePath - reason:(NSString*)reason; - -- (nullable NSDictionary*)processInitAccessDeniedWithChatId:(NSString*)chatId - filePath:(NSString*)filePath; - -- (nullable NSDictionary*)processInitAccessGrantAcceptWithChatId:(NSString*)chatId - filePath:(NSString*)filePath - allowDownload:(BOOL)allowDownload - allowForward:(BOOL)allowForward - accessTime:(NSInteger)accessTime; - -// ============================================================================= -// USER MANAGEMENT -// ============================================================================= - -- (BOOL)createUserProfileWithUsername:(NSString*)username - profileData:(nullable NSDictionary*)profileData; - -- (BOOL)selectUserProfileWithUsername:(NSString*)username useremail:(NSString*)useremail userid:(NSString*)userid; - -- (nullable NSString*)getCurrentUser; - -- (nullable NSArray*)getAvailableUsers; - -- (BOOL)switchProfileWithUsername:(NSString*)username useremail:(NSString*)useremail userid:(NSString*)userid; - -// ============================================================================= -// CHAT OPERATIONS -// ============================================================================= - -- (nullable NSDictionary*)deleteChatRoomWithChatId:(NSString*)chatId; - -- (BOOL)isChatProtected:(NSString*)chatId; - -// ============================================================================= -// BACKUP & RESTORE -// ============================================================================= - -- (nullable NSDictionary*)exportBackup; - -- (nullable NSDictionary*)importBackupWithTarPath:(NSString*)tarPath; - -// ============================================================================= -// CONFIGURATION -// ============================================================================= - -- (BOOL)setConfigWithKey:(NSString*)key value:(NSDictionary*)value; - -- (nullable NSDictionary*)getConfigWithKey:(NSString*)key; - -// ============================================================================= -// FORWARD ACCESS CONTROL (Three-party Trust Model) -// ============================================================================= - -/** - * Forward peer add request - Add a forwardee to forward file access - * @param chatId Chat identifier with the relay/owner - * @param forwardeeChatId Chat identifier with the forwardee - * @param prvFile Path to the .prv file to forward - * @return Result dictionary with PDU (nullable on error) - */ -- (nullable NSDictionary*)processInitForwardPeerAddRequestWithChatId:(NSString*)chatId - forwardeeChatId:(NSString*)forwardeeChatId - prvFile:(NSString*)prvFile; - -/** - * Forwardee initiates forward access request - Request access to a forwarded file - * @param chatId Chat identifier with the relay - * @param filePath Path to the .prv file - * @return Result dictionary with PDU (nullable on error) - */ -- (nullable NSDictionary*)processInitForwardAccessRequestWithChatId:(NSString*)chatId - filePath:(NSString*)filePath; - -/** - * Original owner accepts relay forward access request - * @param chatId Chat identifier with the relay - * @param filePath Path to the .prv file - * @param contactId ID of the forwarder/contact requesting access - * @param accessDuration Duration in seconds for access validity (0 for unlimited) - * @param allowDownload Whether to allow download of the file - * @return Result dictionary with PDU (nullable on error) - */ -- (nullable NSDictionary*)processInitRevertRelayForwardAccessAcceptWithChatId:(NSString*)chatId - filePath:(NSString*)filePath - contactId:(NSString*)contactId - accessDuration:(NSInteger)accessDuration - allowDownload:(BOOL)allowDownload; - -/** - * Original owner denies relay forward access request - * @param chatId Chat identifier with the relay - * @param filePath Path to the .prv file - * @param contactId ID of the forwarder/contact requesting access - * @param denialReason Optional reason for denial (can be nil) - * @return Result dictionary with PDU (nullable on error) - */ -- (nullable NSDictionary*)processInitRevertRelayForwardAccessDeniedWithChatId:(NSString*)chatId - filePath:(NSString*)filePath - contactId:(NSString*)contactId - denialReason:(nullable NSString*)denialReason; - -/** - * Decrypt a forwarded file (file that was forwarded from another peer) - * @param fileId File identifier (actually the prv_file path) - * @param forwarderPeer Peer who forwarded the file (actually the chat_id) - * @return Result dictionary with decryption result (nullable on error) - */ -- (nullable NSDictionary*)processForwardedFileDecryptRequestWithFileId:(NSString*)fileId - forwarderPeer:(NSString*)forwarderPeer; - -/** - * Get detailed file access status list with owner, shared, and forwarded information - * Returns comprehensive view of the file's access control chain in three-party trust model - * @param chatId Chat identifier - * @param filePath Path to the .prv file - * @return Result dictionary with owner_info, shared_info, and forwarded_list (nullable on error) - */ -- (nullable NSDictionary*)getFileAccessStatusListWithChatId:(NSString*)chatId - filePath:(NSString*)filePath; - -// ============================================================================= -// UNIFIED MESSAGE PROCESSING (PRIMARY METHOD) -// ============================================================================= - -/** - * Process any incoming Privitty message (unified processor) - * This is the primary method for handling all incoming Privitty PDUs - * @param eventDataJson JSON string containing the event data - * @return Dictionary with processing result (nullable on error) - */ -- (nullable NSDictionary*)processMessageWithData:(NSString*)eventDataJson; - -/** - * Check if a base64 string is a valid Privitty message - * @param base64Data Base64 encoded string to validate - * @return YES if it's a Privitty message, NO otherwise - */ -- (BOOL)isPrivittyMessageWithString:(NSString*)base64Data; - -@end diff --git a/Privitty.framework/Info.plist b/Privitty.framework/Info.plist deleted file mode 100644 index 1aa38094f..000000000 --- a/Privitty.framework/Info.plist +++ /dev/null @@ -1,29 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - Privitty - CFBundleIdentifier - com.privitty.Privitty - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - Privitty - CFBundlePackageType - FMWK - CFBundleShortVersionString - 0.0.4 - CFBundleVersion - 1 - MinimumOSVersion - 14.0 - CFBundleSupportedPlatforms - - iPhoneOS - iPhoneSimulator - - - diff --git a/Privitty.framework/Modules/module.modulemap b/Privitty.framework/Modules/module.modulemap deleted file mode 100644 index e68614bf2..000000000 --- a/Privitty.framework/Modules/module.modulemap +++ /dev/null @@ -1,9 +0,0 @@ -framework module Privitty { - umbrella header "Privitty.h" - - export * - module * { export * } - - link framework "Foundation" - link framework "Security" -} diff --git a/Privitty.framework/_CodeSignature/CodeDirectory b/Privitty.framework/_CodeSignature/CodeDirectory deleted file mode 100644 index 136c429bc..000000000 Binary files a/Privitty.framework/_CodeSignature/CodeDirectory and /dev/null differ diff --git a/Privitty.framework/_CodeSignature/CodeRequirements b/Privitty.framework/_CodeSignature/CodeRequirements deleted file mode 100644 index e70b7368d..000000000 Binary files a/Privitty.framework/_CodeSignature/CodeRequirements and /dev/null differ diff --git a/Privitty.framework/_CodeSignature/CodeRequirements-1 b/Privitty.framework/_CodeSignature/CodeRequirements-1 deleted file mode 100644 index c23cfb830..000000000 Binary files a/Privitty.framework/_CodeSignature/CodeRequirements-1 and /dev/null differ diff --git a/Privitty.framework/_CodeSignature/CodeResources b/Privitty.framework/_CodeSignature/CodeResources deleted file mode 100644 index def9a0785..000000000 --- a/Privitty.framework/_CodeSignature/CodeResources +++ /dev/null @@ -1,132 +0,0 @@ - - - - - files - - Headers/Privitty.h - - 7XJwNRZwtCUxomO8O7IL7fBgT74= - - Info.plist - - g3lk23mWzYzi7ThM/ASFGdIBWjw= - - Modules/module.modulemap - - AcauDI8HYOHLh2WRfOiaIqnT/kY= - - - files2 - - Headers/Privitty.h - - hash - - 7XJwNRZwtCUxomO8O7IL7fBgT74= - - hash2 - - Ctj7MZKa+vxsHYPazciSO4F29ZdWOQJWl4BdECBZvS0= - - - Modules/module.modulemap - - hash - - AcauDI8HYOHLh2WRfOiaIqnT/kY= - - hash2 - - IWxEj71zgm6RbLOFIYA/WnODiyfO3oTj1stpTzoWMmc= - - - - rules - - ^.* - - ^.*\.lproj/ - - optional - - weight - 1000 - - ^.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Base\.lproj/ - - weight - 1010 - - ^version.plist$ - - - rules2 - - .*\.dSYM($|/) - - weight - 11 - - ^(.*/)?\.DS_Store$ - - omit - - weight - 2000 - - ^.* - - ^.*\.lproj/ - - optional - - weight - 1000 - - ^.*\.lproj/locversion.plist$ - - omit - - weight - 1100 - - ^Base\.lproj/ - - weight - 1010 - - ^Info\.plist$ - - omit - - weight - 20 - - ^PkgInfo$ - - omit - - weight - 20 - - ^embedded\.provisionprofile$ - - weight - 20 - - ^version\.plist$ - - weight - 20 - - - - diff --git a/Privitty.framework/_CodeSignature/CodeSignature b/Privitty.framework/_CodeSignature/CodeSignature deleted file mode 100644 index 9a241270a..000000000 Binary files a/Privitty.framework/_CodeSignature/CodeSignature and /dev/null differ