Files
Cesar de la VegaandClaude Sonnet 5.5 c8aa5951ce feat(checkpoints): Add internal error dialog factory for checkpoints (#8134)
* Add internal error dialog factory for checkpoints

Lets a hybrid bridge supply the content of the checkpoint error dialog while the SDK keeps presenting it. Internal only (`@_spi(Internal)`).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix: address error dialog factory review feedback

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* refactor: Drop error dialog factory timeout

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* refactor: Reuse DefaultErrorPresenter.makeAlert for dialog factory content

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* Add explicit checkpoint error dialog outcomes

* fix(checkpoints): Require explicit error dialog factory in call params

* fix(checkpoints): Address error dialog factory review feedback

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 13:02:47 +01:00

37 lines
1.0 KiB
Swift

//
// Copyright RevenueCat Inc. All Rights Reserved.
//
// Licensed under the MIT License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://opensource.org/licenses/MIT
//
// CheckpointErrorDialog.swift
//
// Created by Cesar de la Vega.
//
import Foundation
/// The content of a checkpoint error dialog supplied by an ``ErrorDialogFactory``.
@_spi(Internal)
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
public struct CheckpointErrorDialog: Sendable, Equatable {
/// The dialog's message.
public let message: String
/// The title of the dismiss button.
public let dismissButtonTitle: String
// Required by no_new_public_inits, which cannot inspect the enclosing type's SPI annotation.
/// Creates a ``CheckpointErrorDialog`` with the given content.
@_spi(Internal)
public init(message: String, dismissButtonTitle: String) {
self.message = message
self.dismissButtonTitle = dismissButtonTitle
}
}