Skip to content

Commit

Permalink
Xcode 13: removed last Swift 5.7 checks
Browse files Browse the repository at this point in the history
Follow up to #3147.
  • Loading branch information
NachoSoto committed Sep 7, 2023
1 parent 5527f88 commit e3a5fcf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
6 changes: 0 additions & 6 deletions Sources/Purchasing/CachingProductsManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,7 @@ extension CachingProductsManager: ProductsManagerType {

}

#if swift(>=5.7)
extension CachingProductsManager: Sendable {}
#else
// @unchecked because:
// - It contains `any`
extension CachingProductsManager: @unchecked Sendable {}
#endif

// MARK: - Private

Expand Down
4 changes: 0 additions & 4 deletions Sources/Purchasing/StoreKitAbstractions/SK2StoreProduct.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,9 @@ internal struct SK2StoreProduct: StoreProductType {
private extension SK2StoreProduct {

var _currencyCode: String? {
#if swift(>=5.7)
if #available(iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0, *) {
return self.currencyCodeFromPriceFormat
}
#endif

// note: if we ever need more information from the jsonRepresentation object, we
// should use Codable or another decoding method to clean up this code.
Expand All @@ -107,12 +105,10 @@ private extension SK2StoreProduct {

// This is marked as `@_backDeploy`, but it's only visible when compiling with Xcode 14.x
// and for some reason only returning a non-empty string on iOS 16+.
#if swift(>=5.7)
@available(iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0, *)
private var currencyCodeFromPriceFormat: String {
return self.underlyingSK2Product.priceFormatStyle.currencyCode
}
#endif

}

Expand Down

0 comments on commit e3a5fcf

Please sign in to comment.