Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
30bddbb
remove starscream
netbe Dec 11, 2025
0a1c446
remove PushChannel
netbe Dec 11, 2025
088bd47
mocktransport
netbe Dec 11, 2025
614dee1
wip
netbe Dec 17, 2025
0394f2a
EventPayloadDecoder
netbe Dec 12, 2025
51759bf
conversationeventprocessor
netbe Dec 12, 2025
3085223
remove strategies
netbe Dec 16, 2025
3e50324
remove LastUpdateEventIDRepository
netbe Dec 16, 2025
762551d
Revert "conversationeventprocessor"
netbe Dec 16, 2025
57ca4ca
Revert "EventPayloadDecoder"
netbe Dec 16, 2025
f7d1b9b
restore conversationEventProcessor
netbe Dec 17, 2025
a25b7c2
wip
netbe Dec 17, 2025
9489f77
Revert "remove LastUpdateEventIDRepository"
netbe Dec 17, 2025
05265dc
fix
netbe Dec 17, 2025
b75abd0
restore notifications
netbe Dec 17, 2025
6a32ebe
wip
netbe Dec 17, 2025
06ec233
build and run
netbe Dec 17, 2025
ea46c48
wip
netbe Dec 17, 2025
802dad8
notification+events
netbe Dec 17, 2025
4433bed
EventPayloadDecoder
netbe Dec 12, 2025
74c44f1
conversationeventprocessor
netbe Dec 12, 2025
59a1500
remove strategies
netbe Dec 16, 2025
baebc7c
remove LastUpdateEventIDRepository
netbe Dec 16, 2025
672c738
Revert "conversationeventprocessor"
netbe Dec 16, 2025
24ecb24
Revert "EventPayloadDecoder"
netbe Dec 16, 2025
4db496b
restore conversationEventProcessor
netbe Dec 17, 2025
4628268
wip
netbe Dec 17, 2025
77f980e
Revert "remove LastUpdateEventIDRepository"
netbe Dec 17, 2025
c2cbffd
fix
netbe Dec 17, 2025
f3cd97d
restore notifications
netbe Dec 17, 2025
1d7e8c8
wip
netbe Dec 17, 2025
f5ea6fb
build and run
netbe Dec 17, 2025
91af1ef
fix warning
netbe Dec 17, 2025
78f3793
wip
netbe Dec 17, 2025
b9baa43
ignore claude
netbe Dec 17, 2025
9a7090d
clean up
netbe Dec 17, 2025
9363003
Revert "notification+events"
netbe Dec 17, 2025
82f2e31
restore
netbe Dec 17, 2025
bead307
fix ref
netbe Dec 17, 2025
b207c61
lazy load crypto
netbe Dec 17, 2025
a26e99b
speed tests
netbe Dec 17, 2025
c07c6d9
compile syncengine and run tests
netbe Dec 17, 2025
22219af
fix test
netbe Dec 17, 2025
996b754
fix tests
netbe Dec 17, 2025
b95669a
fix merge conflict
netbe Dec 19, 2025
9567b15
merge develop resolve conflicts
netbe Jan 7, 2026
9f50322
format
netbe Jan 7, 2026
f19b912
resolve merge conflict with develop
netbe Jan 7, 2026
ed77571
Merge branch 'develop' into chore/remove-legacy
netbe Jan 7, 2026
7203adc
remove unused ZMLocalNotification code
netbe Jan 7, 2026
3716c65
verify code is useful
netbe Jan 7, 2026
d4e6c10
wip
netbe Jan 8, 2026
3439eba
cleanup
netbe Jan 9, 2026
f44fe48
remove logging
netbe Jan 9, 2026
9c25cb1
Apply suggestion from @netbe
netbe Jan 9, 2026
5962ea0
remove dead code
netbe Jan 9, 2026
8368ca8
Merge branch 'chore/remove-legacy' of github.com:wireapp/wire-ios int…
netbe Jan 9, 2026
100cba1
remove minimum api version
netbe Jan 9, 2026
8f913d6
Merge branch 'develop' into chore/remove-legacy
netbe Jan 9, 2026
9289e0f
Apply suggestion from @netbe
netbe Jan 9, 2026
d30d7dc
fix tests
netbe Jan 9, 2026
62327e7
Merge branch 'chore/remove-legacy' of github.com:wireapp/wire-ios int…
netbe Jan 9, 2026
9bb40f7
Merge branch 'develop' into chore/remove-legacy
netbe Jan 13, 2026
cbdb7ff
merge with origin develop
netbe Jan 13, 2026
0aad00e
cleanup and fix sync issue
netbe Jan 13, 2026
bb9d151
format
netbe Jan 13, 2026
bd02346
Merge branch 'chore/remove-legacy' of github.com:wireapp/wire-ios int…
netbe Jan 13, 2026
750568b
Merge branch 'develop' into chore/remove-legacy
netbe Jan 13, 2026
829870e
Merge branch 'develop' into chore/remove-legacy
netbe Jan 15, 2026
1798317
code review
netbe Jan 15, 2026
7ececb3
Merge branch 'chore/remove-legacy' of github.com:wireapp/wire-ios int…
netbe Jan 15, 2026
d627acf
add missing model
netbe Jan 15, 2026
0e63a9e
Merge branch 'develop' into chore/remove-legacy
netbe Jan 20, 2026
6a83aef
code review
netbe Jan 20, 2026
c70174d
Merge branch 'chore/remove-legacy' of github.com:wireapp/wire-ios int…
netbe Jan 20, 2026
bd32de5
Merge branch 'develop' into chore/remove-legacy
netbe Jan 20, 2026
7b46064
fix conflict
netbe Jan 20, 2026
4a91c69
Merge branch 'chore/remove-legacy' of github.com:wireapp/wire-ios int…
netbe Jan 20, 2026
17f8bb7
Merge branch 'develop' into chore/remove-legacy
netbe Jan 20, 2026
1f7f291
Merge branch 'develop' into chore/remove-legacy
netbe Jan 21, 2026
a9d857c
remove test because not needed anymore
netbe Jan 21, 2026
51a288a
Merge branch 'chore/remove-legacy' of github.com:wireapp/wire-ios int…
netbe Jan 21, 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
9 changes: 2 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,5 @@ vendor/*
SnapshotResults
artifacts/

# Automation Config
wire-ios-automation/ios/backendConnections.json
**/backendConnections.json
**/.project

# Automation Output
wire-ios-automation/out/
# AI
.claude
4 changes: 0 additions & 4 deletions WireNetwork/Sources/WireNetwork/Models/API/APIVersion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,3 @@ public enum APIVersion: UInt, CaseIterable, Comparable, Sendable {
}

// swiftlint:enable identifier_name

public extension APIVersion {
static let minimumSyncV2CompatibleVersion: APIVersion = .v5
}
1 change: 1 addition & 0 deletions wire-ios-data-model/Source/Model/User/ZMUser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@
@NSManaged var usesCompanyLogin: Bool

/// If `needsToRefetchLabels` is true we need to refetch the conversation labels (favorites & folders)
@available(*, deprecated, message: "not used, can be cleaned up")
@NSManaged var needsToRefetchLabels: Bool

/// The analytics identifier used for tag analytic events.
Expand Down Expand Up @@ -536,7 +537,7 @@
Set(participantRoles.compactMap(\.conversation))
}
}

Check warning on line 540 in wire-ios-data-model/Source/Model/User/ZMUser.swift

View workflow job for this annotation

GitHub Actions / Test Results

Extension declares a conformance of imported type 'NSManagedObject' to imported protocol 'SafeForLoggingStringConvertible'; this will not behave correctly if the owners of 'CoreData' introduce this conformance in the future

Extension declares a conformance of imported type 'NSManagedObject' to imported protocol 'SafeForLoggingStringConvertible'; this will not behave correctly if the owners of 'CoreData' introduce this conformance in the future

Check warning on line 540 in wire-ios-data-model/Source/Model/User/ZMUser.swift

View workflow job for this annotation

GitHub Actions / Test Results

Extension declares a conformance of imported type 'NSManagedObject' to imported protocol 'SafeForLoggingStringConvertible'; this will not behave correctly if the owners of 'CoreData' introduce this conformance in the future

Extension declares a conformance of imported type 'NSManagedObject' to imported protocol 'SafeForLoggingStringConvertible'; this will not behave correctly if the owners of 'CoreData' introduce this conformance in the future
extension NSManagedObject: SafeForLoggingStringConvertible {
public var safeForLoggingDescription: String {
let moc: String = managedObjectContext?.description ?? "nil"
Expand Down
1 change: 0 additions & 1 deletion wire-ios-data-model/WireDataModel.docc/MLSService.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@

### Pending propoals

- ``commitPendingProposalsIfNeeded()``
- ``commitPendingProposals(in:)``

### Key material
Expand Down
Original file line number Diff line number Diff line change
@@ -1,153 +0,0 @@
//
// Wire
// Copyright (C) 2026 Wire Swiss GmbH
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see http://www.gnu.org/licenses/.
//

import Foundation
import GenericMessageProtocol
import WireCoreCrypto
import WireDataModel
import XCTest

@testable import WireDataModelSupport
@testable import WireRequestStrategy

final class EventDecoderDecryptionTests: MessagingTestBase {

func testThatItCanDecryptOTRMessageAddEvent() async throws {
// GIVEN
let lastEventIDRepository = MockLastEventIDRepositoryInterface()
let sut = EventDecoder(
eventMOC: eventMOC,
syncMOC: syncMOC,
lastEventIDRepository: lastEventIDRepository,
isFederationEnabled: false
)
let text = "Trentatre trentini andarono a Trento tutti e trentatre trotterellando"
let generic = GenericMessage(content: Text(content: text))

// WHEN
let decryptedEvent = try await decryptedUpdateEventFromOtherClient(
message: generic,
eventDecoder: sut
)

await syncMOC.performGrouped {
// THEN
XCTAssertEqual(decryptedEvent.senderUUID, self.otherUser.remoteIdentifier!)
XCTAssertEqual(decryptedEvent.recipientClientID, self.selfClient.remoteIdentifier!)

guard let decryptedMessage = ZMClientMessage.createOrUpdate(
from: decryptedEvent,
in: self.syncMOC,
prefetchResult: nil
) else {
return XCTFail("Failed to create client message")
}
XCTAssertEqual(decryptedMessage.nonce?.transportString(), generic.messageID)
XCTAssertEqual(decryptedMessage.textMessageData?.messageText, text)
}
}

func testThatItCanDecryptOTRAssetAddEvent() async throws {
// GIVEN
let lastEventIDRepository = MockLastEventIDRepositoryInterface()
let sut = EventDecoder(
eventMOC: eventMOC,
syncMOC: syncMOC,
lastEventIDRepository: lastEventIDRepository,
isFederationEnabled: false
)
let image = verySmallJPEGData()
let imageSize = ZMImagePreprocessor.sizeOfPrerotatedImage(with: image)
let properties = ZMIImageProperties(size: imageSize, length: UInt(image.count), mimeType: "image/jpg")
let keys = ZMImageAssetEncryptionKeys(otrKey: Data.randomEncryptionKey(), sha256: image.zmSHA256Digest())
let generic = GenericMessage(content: ImageAsset(
mediumProperties: properties,
processedProperties: properties,
encryptionKeys: keys,
format: .medium
))

// WHEN
let decryptedEvent = try await decryptedAssetUpdateEventFromOtherClient(
message: generic,
eventDecoder: sut
)

await syncMOC.perform {
// THEN
guard let decryptedMessage = ZMAssetClientMessage.createOrUpdate(
from: decryptedEvent,
in: self.syncMOC,
prefetchResult: nil
) else {
return XCTFail("Failed to create client message")
}

XCTAssertEqual(decryptedMessage.nonce?.transportString(), generic.messageID)
}
}

func testThatItInsertsAUnableToDecryptMessageIfItCanNotEstablishASession() async throws {
// GIVEN
let lastEventIDRepository = MockLastEventIDRepositoryInterface()
let sut = EventDecoder(
eventMOC: eventMOC,
syncMOC: syncMOC,
lastEventIDRepository: lastEventIDRepository,
isFederationEnabled: false
)
var event: ZMUpdateEvent!

await syncMOC.perform {
let innerPayload = [
"recipient": self.selfClient.remoteIdentifier!,
"sender": self.otherClient.remoteIdentifier!,
"id": UUID.create().transportString(),
"text": Data("bah".utf8).base64String()
]

let payload = [
"type": "conversation.otr-message-add",
"from": self.otherUser.remoteIdentifier!.transportString(),
"data": innerPayload,
"conversation": self.groupConversation.remoteIdentifier!.transportString(),
"time": Date().transportString()
] as [String: Any]
let wrapper = [
"id": UUID.create().transportString(),
"payload": [payload]
] as [String: Any]

event = ZMUpdateEvent.eventsArray(from: wrapper as NSDictionary, source: .download)!.first!
}

// WHEN
_ = await sut.decryptProteusEventAndAddClient(event, in: syncMOC) { _, _ in
throw ProteusService.DecryptionError.failedToEstablishSessionFromMessage(.SessionNotFound)
}

await syncMOC.perform {
// THEN
guard let lastMessage = self.groupConversation.lastMessage as? ZMSystemMessage else {
return XCTFail("Last conversation message is not a system message")
}
XCTAssertEqual(lastMessage.systemMessageType, .decryptionFailed)
}
}

}
Comment thread
netbe marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,9 @@ typedef NS_OPTIONS(NSUInteger, ZMStrategyConfigurationOption) {
/** Strategy is allowed to make requests while the application is operating in the background.
*/
ZMStrategyConfigurationOptionAllowsRequestsWhileInBackground = 1 << 1,

/** Strategy is allowed to make requests while the application is waiting for the websocket to be established.
*/
ZMStrategyConfigurationOptionAllowsRequestsWhileWaitingForWebsocket = 1 << 2,


/** Strategy is allowed to make requests when the application is online and is receiving events via the web socket.
*/
ZMStrategyConfigurationOptionAllowsRequestsWhileOnline = 1 << 3,

/** Strategy is allowed to make requests during slow sync phase.

During the slow sync phase the application is downloading metadata about users, conversations, etc..
*/
ZMStrategyConfigurationOptionAllowsRequestsDuringSlowSync = 1 << 4,

/** Strategy is allowed to make requests during quick sync phase.

During the quick sync phase the application is catching up on changes since it was last active, during this phase we are downloading and decrypting messages.

WARNING: it's important that we don't send any encrypted message during this phase since it can lead to encryption errors.
*/
ZMStrategyConfigurationOptionAllowsRequestsDuringQuickSync = 1 << 5
};

This file was deleted.

This file was deleted.

Loading
Loading