Skip to content

Conversation

@David-Henner
Copy link
Contributor

@David-Henner David-Henner commented Dec 18, 2025

TaskWPB-20920 [iOS] Update to CC 9.1.0

Issue

Bumping core crypto to version 9.1.2.

Core crypto now handles safe multi-process access, so SafeCoreCrypto becomes redundant, hence why we're removing it in this PR

Testing

Creating channels, sending messages, adding / removing users


Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the core crypto dependency and removes the SafeCoreCrypto wrapper class, which is now redundant since core crypto v9.x handles safe multi-process access internally. The main changes include replacing SafeCoreCryptoProtocol with direct CoreCryptoProtocol usage, renaming the transaction method from perform to transaction, and updating error constructors to use named parameters.

Key changes:

  • Removed SafeCoreCrypto wrapper class and its tests
  • Updated all usages to directly use CoreCryptoProtocol instead of SafeCoreCryptoProtocol
  • Changed method calls from perform to transaction throughout the codebase
  • Updated CoreCrypto error constructors to use named parameters (e.g., errorCode:, mlsError:, msg:)

Reviewed changes

Copilot reviewed 50 out of 51 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
WireCoreCrypto/Package.swift Updated core crypto framework URLs and checksums to v9.1.2
wire-ios-data-model/Support/Sources/MockSafeCoreCrypto.swift Removed redundant SafeCoreCrypto mock class
wire-ios-data-model/Support/Sources/MockCoreCryptoProtocol.swift Added mockTransaction helper method and updated transaction method signature
wire-ios-data-model/Support/Sourcery/generated/AutoMockable.generated.swift Updated generated mocks to reflect CoreCryptoProtocol return type and removed proteusCryptoboxMigrate method
wire-ios-data-model/Source/Utilis/CoreCryptoContextProtocolExt.swift Removed proteusCryptoboxMigrate method and added documentation for new methods
wire-ios-data-model/Source/ManagedObjectContext/NSManagedObjectContext+CoreCrypto.swift Changed property type from SafeCoreCryptoProtocol to CoreCryptoProtocol
wire-ios-data-model/Source/Proteus/ProteusService.swift Updated to use CoreCryptoProtocol and transaction method instead of perform
wire-ios-data-model/Source/MLS/MLSService.swift Updated to use CoreCryptoProtocol and transaction method
wire-ios-data-model/Source/MLS/MLSEncryptionService.swift Updated to use CoreCryptoProtocol and transaction method
wire-ios-data-model/Source/MLS/MLSActionExecutor.swift Updated to use CoreCryptoProtocol, transaction method, and updated error constructor
wire-ios-data-model/Source/MLS/CreateMLSGroupUseCase.swift Updated to use CoreCryptoProtocol and transaction method
wire-ios-data-model/Source/E2EIdentity/E2EIVerificationStatusService.swift Updated to use CoreCryptoProtocol and transaction method
wire-ios-data-model/Source/E2EIdentity/E2EISetupService.swift Updated to use CoreCryptoProtocol and transaction method
wire-ios-data-model/Source/E2EIdentity/E2EIService.swift Updated to use CoreCryptoProtocol
wire-ios-data-model/Source/UseCases/IsUserE2EICertifiedUseCase.swift Updated to use transaction method
wire-ios-data-model/WireDataModel.xcodeproj/project.pbxproj Removed SafeCoreCrypto.swift and SafeCoreCryptoTests.swift from build targets
wire-ios-data-model/Tests/**/*.swift Updated all test files to use MockCoreCryptoProtocol with mockTransaction helper, removed MockSafeCoreCrypto usage, and updated error constructors to use named parameters
wire-ios-sync-engine/Source/UserSession/NSManagedObject+CryptoStack.swift Removed explicit tearDown call for coreCrypto
wire-ios-sync-engine/Tests/**/*.swift Updated test files to use MockCoreCryptoProtocol instead of MockSafeCoreCrypto
wire-ios-request-strategy/Sources/E2EIdentity/E2EIKeyPackageRotator.swift Updated to use CoreCryptoProtocol and transaction method
wire-ios-request-strategy/Tests/Helpers/*.swift Updated test helpers to use CoreCrypto instead of SafeCoreCrypto and removed tearDown calls
WireDomain/Sources/WireDomain/Synchronization/*.swift Updated synchronization components to use transaction method
WireDomain/Tests/WireDomainTests/Synchronization/*.swift Updated test files to use MockCoreCryptoProtocol with mockTransaction

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +24 to +25
url: "https://github.com/wireapp/core-crypto/releases/download/v9.1.2/WireCoreCrypto.xcframework.zip",
checksum: "152fa5e1f43c05c283106df2ab51267092d8b92f02b15debc91f8b237dda1490"
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title and description mention upgrading to core crypto v9.2.0, but the Package.swift file references v9.1.2. Please verify the correct version number and ensure consistency between the PR metadata and the actual package version being used.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. updated the description

@David-Henner David-Henner changed the title chore: bump core crypto to v9.2.0 - WPB-20920 chore: bump core crypto to v9.1.2 - WPB-20920 Dec 18, 2025
@github-actions
Copy link
Contributor

Test Results

    4 files    645 suites   20m 1s ⏱️
5 324 tests 5 324 ✅ 0 💤 0 ❌
5 325 runs  5 325 ✅ 0 💤 0 ❌

Results for commit 2a5786f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants