Skip to content

Send current algorithm and protocol version to watchOS.#875

Open
hvge wants to merge 4 commits intodevelopfrom
issues/873-watch-connectivity
Open

Send current algorithm and protocol version to watchOS.#875
hvge wants to merge 4 commits intodevelopfrom
issues/873-watch-connectivity

Conversation

@hvge
Copy link
Member

@hvge hvge commented Mar 24, 2026

This PR ensures that an additional information about an activation on iOS is sent to watchOS when the activation is present. The change also contains a communication protocol change that allows to handle the current and the future protocol version updates.

The communication protocol changes must be compatible with changes on watchOS side (PR wultra/powerauth-mobile-watch-sdk#10)

@hvge hvge requested a review from Copilot March 24, 2026 14:55
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

Extend iOS↔watchOS WatchConnectivity payloads to include activation algorithm and protocol version, while introducing a packet header version mechanism for forward/backward compatibility.

Changes:

  • Add activation algorithm + protocol version fields to activation status packets and serialization.
  • Introduce a versioned packet header (PAwc + version byte) and a mechanism to reply with the sender’s header version on incompatibility.
  • Adjust protocol-version string API to return nil when unsupported and update the cc7 submodule.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
proj-xcode/PowerAuthCore/PowerAuthCoreSession.mm Wrap protocol-version conversion in try/catch and return nil on failure.
proj-xcode/PowerAuthCore/PowerAuthCoreSession.h Update API contract to nullable when protocol version is unsupported.
proj-xcode/PowerAuth2/private/PA2WCSessionPacket_Constants.m Change user-info key namespace; add keys for algorithm/protocol version fields.
proj-xcode/PowerAuth2/private/PA2WCSessionPacket_Constants.h Expose new activation serialization keys.
proj-xcode/PowerAuth2/private/PA2WCSessionPacket_ActivationStatus.m Serialize/deserialize algorithm + protocol version.
proj-xcode/PowerAuth2/private/PA2WCSessionPacket_ActivationStatus.h Add algorithm + protocol version properties to activation status payload.
proj-xcode/PowerAuth2/private/PA2WCSessionPacket.h Add customPacketVersion field for version-mismatch replies.
proj-xcode/PowerAuth2/PowerAuthWCSessionManager.m Implement header versioning and error reply behavior for incompatible packet versions.
proj-xcode/PowerAuth2/PowerAuthWCSessionManager.h Fix typo in documentation comment.
proj-xcode/PowerAuth2/PowerAuthSDK+WatchSupport.m Populate activation status with algorithm + protocol version (derived from current algorithm).
cc7 Update submodule revision.

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

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

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


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

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.


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

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