Skip to content

Commit

Permalink
PriceFormatterProvider.priceFormatterForSK2: enable on all versions (
Browse files Browse the repository at this point in the history
…#2712)

This is required for #2711
  • Loading branch information
NachoSoto authored Jun 27, 2023
1 parent c7db551 commit 074c91d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion Sources/Misc/PriceFormatterProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ final class PriceFormatterProvider: Sendable {

private let cachedPriceFormatterForSK2: Atomic<NumberFormatter?> = nil

@available(iOS 15.0, tvOS 15.0, watchOS 8.0, macOS 12.0, *)
func priceFormatterForSK2(withCurrencyCode currencyCode: String) -> NumberFormatter {
func makePriceFormatterForSK2(with currencyCode: String) -> NumberFormatter {
let formatter = NumberFormatter()
Expand Down
3 changes: 0 additions & 3 deletions Tests/StoreKitUnitTests/PriceFormatterProviderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ class PriceFormatterProviderTests: StoreKitConfigTestCase {
expect(firstPriceFormatter) === secondPriceFormatter
}

@available(iOS 15.0, tvOS 15.0, macOS 12.0, watchOS 8.0, *)
func testReturnsCachedPriceFormatterForSK2() throws {
try AvailabilityChecks.iOS15APIAvailableOrSkipTest()

let currencyCode = "USD"
let firstPriceFormatter = self.priceFormatterProvider.priceFormatterForSK2(withCurrencyCode: currencyCode)

Expand Down

0 comments on commit 074c91d

Please sign in to comment.