From 8b4768c0c336f8ff25008c19657f7fb938d9e699 Mon Sep 17 00:00:00 2001 From: Nikita Vasilev Date: Fri, 18 Oct 2024 14:15:48 +0900 Subject: [PATCH] Fix GitHub Actions --- .../Models/Internal/SK2RenewalInfo.swift | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Sources/Flare/Classes/Models/Internal/SK2RenewalInfo.swift b/Sources/Flare/Classes/Models/Internal/SK2RenewalInfo.swift index ea9169b91..964b86d7b 100644 --- a/Sources/Flare/Classes/Models/Internal/SK2RenewalInfo.swift +++ b/Sources/Flare/Classes/Models/Internal/SK2RenewalInfo.swift @@ -68,14 +68,22 @@ extension SK2RenewalInfo: IRenewalInfo { } var renewalPrice: Decimal? { - underlyingRenewalInfo.renewalPrice + #if swift(>=6.0) + underlyingRenewalInfo.renewalPrice + #else + nil + #endif } var currency: String? { - if #available(iOS 16.0, macOS 13.0, watchOS 9.0, tvOS 16.0, *) { - underlyingRenewalInfo.currency?.identifier - } else { + #if swift(>=6.0) + if #available(iOS 16.0, macOS 13.0, watchOS 9.0, tvOS 16.0, *) { + underlyingRenewalInfo.currency?.identifier + } else { + underlyingRenewalInfo.currencyCode + } + #else underlyingRenewalInfo.currencyCode - } + #endif } }