mirror of
https://github.com/RevenueCat/purchases-ios
synced 2026-11-11 22:55:55 +05:45
* 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
34 lines
918 B
Swift
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
|