Upgrade — iOS UIKit v5#
The Curity HAAPI iOS UIKit framework shipped its v5.0 major release on 2025-11-03, followed by minor releases through 5.4.0 (2026-05-04). This page covers the migration from v4.x to v5.x and highlights the notable additions in each 5.x release.
For the authoritative per-release detail, see the changelog on curity.io/docs/haapi-ios-ui-kit/latest/CHANGELOG.html.
Breaking Changes in v5.0#
Strict Concurrency#
The framework is now compiled with Strict Concurrency Checking set to Complete, Default Actor Isolation set to NonIsolated, and Approachable Concurrency enabled. Host apps with their own strict-concurrency settings should expect new diagnostics where types cross actor boundaries.
@MainActor is now explicit on these protocols and their members:
InteractionErrorModelInteractionValueModelInteractionItemSelectModelInteractionItemCheckboxModel
If you implement these protocols in custom UI mappers, your conforming types must satisfy the @MainActor constraint at the call sites where the framework invokes them.
Async Flow Control#
HaapiFlowViewModel.start, submit, and followLink are now async functions. Callers must await them inside a Task or async context.
// Before (v4.x)
viewModel.start()
// After (v5.0+)
Task {
await viewModel.start()
}
OAuthErrorModel Alignment#
OAuthErrorModel is aligned with the lower-layer ErrorTokenResponse (RFC 6749):
error_descriptionis now optionalerror_uri(optional) has been added
Code that force-unwraps errorDescription must guard against nil.
Breaking Changes in v5.1#
The HandleableProblemType enum gained a new case: tooManyAttemptsProblem. This is a source-breaking change only if you switch on HandleableProblemType without a default branch.
switch problemType {
case .invalidInputProblem: …
case .tooManyAttemptsProblem: … // ← new in 5.1
default: …
}
Notable Additions Across 5.x#
5.1 (2025-12-15)#
HaapiUIKitConfigurationBuilder.setUsePasskeysBrowserFallback— configures behavior when Passkeys are not supported on the device.- Improved handling for
Too Many AttemptsandIncorrect Credentialsproblems inFormViewController.
5.2 (2026-02-09)#
preSubmithook inBaseViewControllernow uses the correctopenvisibility modifier so subclasses can override it.- Canceling a closing flow keeps the flow active rather than terminating it.
5.3 (2026-03-23)#
- New
BankIdViewControllerandBankIdModelaligned with latest BankID and accessibility requirements. HaapiResponseTypeableprotocol —UIInteractionModel,UIProblemModel, andUIOperationModelnow expose the originating HAAPI representation type viarepresentationType.isRequiredonInteractionValueModel(and the built-in input / checkbox / select models).FormViewControllerrenders a required-field asterisk on text and select fields during signup, using the configurederrorColorfromInputTextFieldstyle.- Polling models honor the server-provided interval; cadence fallback is server interval → BankID 1 s → configured
autoPollingDuration. - Logging migration —
setLogType()introduced; staticisXxxEnabledflags are deprecated. See Upgrade — HaapiLogger setLogType Migration .
5.4 (2026-05-04)#
HaapiUIPreviewer(DEBUG-only) — Xcode preview surface for theming iteration, component galleries, and embedded diagnostics overlay. Marked experimental; minor releases may introduce breaking changes.userCodemessage style forMessageView— 2-column monospace grid for recovery codes with a “Copy codes” action. AddsMessageStyleAttribute.usercodeandMessageView.UserCodetheming key.
Related Driver / SDK Migrations#
iOS UIKit composes the iOS SDK and Driver layers. The following lower-layer changes are visible to host apps that touch those types directly:
- DPoP Nonce Auto-Management — framework now manages the DPoP nonce internally (Driver v5.4).
- HaapiLogger setLogType Migration — logging API migration (v5.3).
Backward Compatibility#
- The
dpopNonceparameter onHaapiTokenManagerasync methods remains honored for backward compatibility through v5.x; new code should omit it. - Deprecated symbols are kept as bridges within v5.x and are candidates for removal in the next major.