Send current algorithm and protocol version to watchOS.#875
Send current algorithm and protocol version to watchOS.#875
Conversation
There was a problem hiding this comment.
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
nilwhen 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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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)