Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
99a10cc
Privitty framework Integration
milinddeorepriv Oct 7, 2025
305975e
PrvContext, Handshake
milinddeorepriv Oct 16, 2025
8e288c4
PrvContext, Handshake
milinddeorepriv Oct 16, 2025
1a44107
ci.yml fixed for CI
milinddeorepriv Oct 16, 2025
e0edbb5
merged
milinddeorepriv Oct 16, 2025
663823e
Merge pull request #9 from Privitty/tix-8
milinddeore Oct 16, 2025
81bf75b
Point invite link to privitty
milinddeorepriv Oct 16, 2025
850b6e9
Merge pull request #10 from Privitty/tix-4
nyerunkar Oct 16, 2025
ea15177
Merge pull request #7 from Privitty/tix-2
nyerunkar Oct 16, 2025
69cdcc1
This commit has following:
Oct 18, 2025
2d42a71
:Merge branch 'main' into privitty_logo_colors_changes
Oct 27, 2025
227571c
This commit has following:
Oct 29, 2025
2a29c06
This commit has following:
Oct 31, 2025
7ad4060
This commit has following:
Nov 5, 2025
1bd17ac
Merge pull request #13 from rohidas-patil-mobisoft/privitty_logo_colo…
milinddeore Nov 6, 2025
45792bc
Default server chat.privittytech.com
milinddeorepriv Oct 17, 2025
1911810
Signing App
milinddeorepriv Nov 17, 2025
ee3da52
chatRoom & chatList fixes:
milinddeorepriv Nov 18, 2025
b1c9f3d
Merge pull request #15 from Privitty/privitty-signing-app
nyerunkar Nov 18, 2025
8c450fb
Merge pull request #17 from Privitty/chatRoom-ChatList-fixes
nyerunkar Nov 18, 2025
1a0a17c
Minor fixes & Debugging
milinddeorepriv Nov 18, 2025
35657ef
message box fixes and file sharing added.
milinddeorepriv Nov 22, 2025
e38551c
Merge pull request #19 from Privitty/minor-mbox-fixes
nyerunkar Nov 22, 2025
af21093
font fixes and bell icon added on content type message
nyerunkar Dec 3, 2025
5dadb95
Merge pull request #20 from Privitty/ui-change-font-fixes
milinddeore Dec 3, 2025
7370a63
Updated LaunchScreen and create from screen
milinddeorepriv Dec 5, 2025
b9f2a6c
content page added with merge resolved
nyerunkar Dec 6, 2025
e6f0535
Merge pull request #23 from Privitty/content-page
milinddeore Dec 6, 2025
9d27027
Revoke message
milinddeorepriv Dec 8, 2025
cea8924
Delete chat room
milinddeorepriv Dec 9, 2025
3ea2874
Add watermark
milinddeorepriv Dec 9, 2025
8d091cb
Revoke message
milinddeorepriv Dec 8, 2025
ad6370c
Delete chat room
milinddeorepriv Dec 9, 2025
356b355
Add watermark
milinddeorepriv Dec 9, 2025
eba0411
File forward flow
milinddeorepriv Dec 16, 2025
b4c6308
Delete chat room
milinddeorepriv Dec 9, 2025
93eb6e1
Add watermark
milinddeorepriv Dec 9, 2025
d341523
File forward flow
milinddeorepriv Dec 16, 2025
696cffe
merged conflicts
milinddeorepriv Dec 16, 2025
9974fb9
Merge branch 'forward-flow' of https://github.com/Privitty/privitty-i…
milinddeorepriv Dec 16, 2025
70b7542
Merge pull request #33 from Privitty/forward-flow-fix
nyerunkar Dec 17, 2025
ab2048e
Add second device
milinddeorepriv Jan 13, 2026
55d5e48
Add second device
milinddeorepriv Jan 13, 2026
9470086
Merge pull request #35 from Privitty/add-second-device
nyerunkar Jan 13, 2026
0dac5e1
Get Started Screen added
milinddeorepriv Jan 14, 2026
cb0bf63
Remove Privitty.framework binary, add to gitignore
milinddeorepriv Jan 14, 2026
94fb355
Add Privitty framework as zip file
milinddeorepriv Jan 14, 2026
0c12b74
merge conflicts with main, resolved
milinddeorepriv Jan 14, 2026
9d0a240
Merge pull request #38 from Privitty/get-started-screen-1
nyerunkar Jan 16, 2026
cfeef72
Merge pull request #37 from Privitty/get-started-screen
milinddeore Jan 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Privitty.framework.zip
Binary file not shown.
Binary file modified Privitty.framework/Privitty
Binary file not shown.
Binary file modified Privitty.framework/_CodeSignature/CodeDirectory
Binary file not shown.
Binary file modified Privitty.framework/_CodeSignature/CodeRequirements-1
Binary file not shown.
Binary file modified Privitty.framework/_CodeSignature/CodeSignature
Binary file not shown.
12 changes: 8 additions & 4 deletions deltachat-ios.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
AE6EC5242497663200A400E4 /* UIImageView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE6EC5232497663200A400E4 /* UIImageView+Extensions.swift */; };
AE728F15229D5C390047565B /* PhotoPickerAlertAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE728F14229D5C390047565B /* PhotoPickerAlertAction.swift */; };
AE76E5EE242BF2EA003CF461 /* WelcomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE76E5ED242BF2EA003CF461 /* WelcomeViewController.swift */; };
F4FA10E83EA041329C24AAF6 /* ServerSelectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D436D0085A422CB2AA0795 /* ServerSelectionViewController.swift */; };
AE77838F23E4276D0093EABD /* ContactCellViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE77838E23E4276D0093EABD /* ContactCellViewModel.swift */; };
AE8519EA2272FDCA00ED86F0 /* DeviceContactsHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE8519E92272FDCA00ED86F0 /* DeviceContactsHandler.swift */; };
AE851AC5227C755A00ED86F0 /* Protocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE851AC4227C755A00ED86F0 /* Protocols.swift */; };
Expand Down Expand Up @@ -541,6 +542,7 @@
AE6EC5232497663200A400E4 /* UIImageView+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImageView+Extensions.swift"; sourceTree = "<group>"; };
AE728F14229D5C390047565B /* PhotoPickerAlertAction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhotoPickerAlertAction.swift; sourceTree = "<group>"; };
AE76E5ED242BF2EA003CF461 /* WelcomeViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WelcomeViewController.swift; sourceTree = "<group>"; };
37D436D0085A422CB2AA0795 /* ServerSelectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ServerSelectionViewController.swift; sourceTree = "<group>"; };
AE77838E23E4276D0093EABD /* ContactCellViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactCellViewModel.swift; sourceTree = "<group>"; };
AE8519E92272FDCA00ED86F0 /* DeviceContactsHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceContactsHandler.swift; sourceTree = "<group>"; };
AE851AC4227C755A00ED86F0 /* Protocols.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Protocols.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1077,6 +1079,7 @@
children = (
D8A0729E2BED0FC8001A4C7C /* Instand Onboarding */,
AE76E5ED242BF2EA003CF461 /* WelcomeViewController.swift */,
37D436D0085A422CB2AA0795 /* ServerSelectionViewController.swift */,
AEE56D752253431E007DC082 /* AccountSetupController.swift */,
30C0D49C237C4908008E2A0E /* CertificateCheckController.swift */,
AE18F293228C602A0007B1BE /* SecuritySettingsController.swift */,
Expand Down Expand Up @@ -1880,6 +1883,7 @@
5F785F6E2CB9344F003FFFB9 /* ReusableCellProtocol.swift in Sources */,
D8C1B0DD2CE7421C00C233A7 /* ShareProxyViewController.swift in Sources */,
AE76E5EE242BF2EA003CF461 /* WelcomeViewController.swift in Sources */,
F4FA10E83EA041329C24AAF6 /* ServerSelectionViewController.swift in Sources */,
3052C60A253F082E007D13EA /* MessageLabelDelegate.swift in Sources */,
2FB219D92EF167CB00A7E8A8 /* FileAccessControlViewController.swift in Sources */,
AE0AA9562478191900D42A7F /* GridCollectionViewFlowLayout.swift in Sources */,
Expand Down Expand Up @@ -2353,7 +2357,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 142;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = 8Y86453UA8;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand All @@ -2374,7 +2378,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 2.11.0;
MARKETING_VERSION = 1.0.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -2420,7 +2424,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 142;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 8Y86453UA8;
ENABLE_NS_ASSERTIONS = NO;
Expand All @@ -2435,7 +2439,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 2.11.0;
MARKETING_VERSION = 1.0.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
51 changes: 27 additions & 24 deletions deltachat-ios/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
self.launchOptions = launchOptions
continueDidFinishLaunchingWithOptions()

if !PrvContext.shared.initialize() {
logger.error("APP DELEGATE: Failed to initialize Privitty Core")
}

// Verify Poppins fonts are loaded
#if DEBUG
logger.info("🔤 Verifying custom fonts...")
Expand Down Expand Up @@ -145,7 +141,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
relayHelper = RelayHelper.setup(dcAccounts.getSelected())
appCoordinator = AppCoordinator(window: window, dcAccounts: dcAccounts)
locationManager = LocationManager(dcAccounts: dcAccounts)
UIApplication.shared.setMinimumBackgroundFetchInterval(UIApplication.backgroundFetchIntervalMinimum)
// Note: setMinimumBackgroundFetchInterval is deprecated in iOS 13.0+
// Background fetch is handled by BackgroundTasks framework in modern iOS
if #available(iOS 13.0, *) {
// Background fetch is managed by BackgroundTasks framework
} else {
UIApplication.shared.setMinimumBackgroundFetchInterval(UIApplication.backgroundFetchIntervalMinimum)
}
notificationManager = NotificationManager(dcAccounts: dcAccounts)
setStockTranslations()
dcAccounts.startIo()
Expand Down Expand Up @@ -189,13 +191,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
registerForNotifications()
prepopulateWidget()

// Ensure Privitty user is selected after account is configured
// Initialize Privitty for existing accounts (e.g., after backup restore)
let dcContext = dcAccounts.getSelected()
if PrvContext.shared.switchProfile(for: dcContext) {
logger.info("Privitty profile aligned with selected account on app launch")
} else {
logger.error("Failed to align Privitty profile on app launch")
}
PrvContext.shared.initializePrivittyForSelectedAccount(dcContext: dcContext)
}

launchOptions = nil
Expand Down Expand Up @@ -603,8 +601,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
if dcAccounts.getSelected().isConfigured() {
appCoordinator.resetTabBarRootViewControllers()

// Ensure Privitty user is selected after account reload
// Initialize Privitty if not already initialized (e.g., after backup restore)
let dcContext = dcAccounts.getSelected()
if !PrvContext.shared.isInitialized() {
PrvContext.shared.initializePrivittyForSelectedAccount(dcContext: dcContext)
}

// Ensure Privitty user is selected after account reload
if PrvContext.shared.switchProfile(for: dcContext) {
logger.info("Privitty profile aligned with selected account on context reload")
} else {
Expand Down Expand Up @@ -641,29 +644,29 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
let chatContext = dcContext.getChat(chatId: chatId)

// Check if message is encrypted and not a contact request
logger.debug("Privitty: Message received")
logger.info("Privitty: Message received")
if chatContext.isProtected && !chatContext.isContactRequest {
logger.debug("Privitty: Protected message received")
logger.info("Privitty: Protected message received")

if let messageText = dcMsg.text,
PrvContext.shared.isPrivittyMessage(messageText) {
logger.debug("Privitty: Message detected for chatId: \(chatId)")
logger.info("Privitty: Message detected for chatId: \(chatId)")

// Process the Privitty message
let result = PrvContext.shared.processIncomingMessage(chatId: chatId, pdu: messageText, direction: "incoming")

logger.debug("Privitty: Result: \(result)")
logger.info("Privitty: Result: \(result)")

if result.success {
logger.info("Privitty: Message processed successfully")

// Parse response structure: data.data.pdu and data.data.chat_id (matches Android line 206)
if let data = result.data {
logger.debug("Privitty: Response data exists, keys: \(Array(data.keys))")
logger.info("Privitty: Response data exists, keys: \(Array(data.keys))")

// Check if response has "data" key (matches Android: responseJson.has("data"))
if let dataDataJson = data["data"] as? [String: Any] {
logger.debug("Privitty: Found data.data, keys: \(Array(dataDataJson.keys))")
logger.info("Privitty: Found data.data, keys: \(Array(dataDataJson.keys))")

// Check if dataDataJson has "data" key (matches Android: dataDataJson.has("data"))
// Try data.data.data first (Android structure), then fall back to data.data (iOS structure)
Expand All @@ -672,19 +675,19 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
if let nestedData = dataDataJson["data"] as? [String: Any] {
// Triple nested: data.data.data (Android structure)
dataJson = nestedData
logger.debug("Privitty: Found data.data.data (triple nested - Android structure)")
logger.info("Privitty: Found data.data.data (triple nested - Android structure)")
} else if dataDataJson["pdu"] != nil {
// Double nested: data.data (iOS structure - pdu and chat_id are directly here)
dataJson = dataDataJson
logger.debug("Privitty: Using data.data directly (double nested - iOS structure)")
logger.info("Privitty: Using data.data directly (double nested - iOS structure)")
}

if let dataJson = dataJson {
logger.debug("Privitty: Processing dataJson, keys: \(Array(dataJson.keys))")
logger.info("Privitty: Processing dataJson, keys: \(Array(dataJson.keys))")

// Check if dataJson has "pdu" key (matches Android: dataJson.has("pdu"))
if let pdu = dataJson["pdu"] as? String {
logger.debug("Privitty: Found PDU, size: \(pdu.count)")
logger.info("Privitty: Found PDU, size: \(pdu.count)")

// Extract chat_id from response (matches Android: dataJson.has("chat_id"))
// Note: chat_id might be Int or String, handle both cases
Expand All @@ -701,7 +704,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
let msg = dcContext.newMessage(viewType: DC_MSG_TEXT)
msg.text = pdu
dcContext.sendMessage(chatId: puntChatId, message: msg)
logger.debug("Privitty: Privitty PDU sent - chatId: \(chatId), puntChatId: \(puntChatId)")
logger.info("Privitty: Privitty PDU sent - chatId: \(chatId), puntChatId: \(puntChatId)")
} else {
logger.error("Privitty: chat ID is missing or invalid for the requested PDU")
logger.error("Privitty: chat_id value: \(String(describing: dataJson["chat_id"])), type: \(type(of: dataJson["chat_id"]))")
Expand All @@ -725,7 +728,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
logger.error("Privitty: Failed to process message: \(result.error ?? "Unknown error")")
}
} else {
logger.debug("Privitty: Not a Privitty message")
logger.info("Privitty: Not a Privitty message")
}
}
}
Expand Down
Loading
Loading