Files
purchases-ios/Sources/Support/DebugUI/SDKHealthCheckStatus+Icon.swift
T
Pol Piella Abadia f14673852e Fix Backwards compatibility errors introduced by new testSDKHealthCheck implementation (#5022)
* Forks into a separate method to be preserver backwards compatibility

* Resets `PurchasesDiagnosticsHealth` to state before merge

* Adds missing unit tests

* Fixes lint errors

* Fixes errors

* Updates documentation

* Moves types under the debug flag

* Moves more types under debug

* Adds reference to error in documentations
2025-04-28 17:26:06 +00:00

34 lines
918 B
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
//
// SDKHealthCheckStatus+Icon.swift
//
// Created by Pol Piella on 4/10/25.
#if DEBUG
import SwiftUI
@available(iOS 16.0, macOS 13.0, *)
extension PurchasesDiagnostics.SDKHealthCheckStatus {
var icon: some View {
switch self {
case .passed:
return Image(systemName: "checkmark.circle.fill")
.foregroundColor(.green)
case .failed:
return Image(systemName: "xmark.circle.fill")
.foregroundColor(.red)
case .warning:
return Image(systemName: "exclamationmark.triangle.fill")
.foregroundColor(.yellow)
}
}
}
#endif