Skip to content

Commit

Permalink
Fix compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Tikhonenko committed May 25, 2021
1 parent 4da890a commit 0dcd33f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Sources/Extras.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import StoreKit
@available(watchOSApplicationExtension 6.2, *)
fileprivate var refreshSession: RefreshSession?

@available(tvOS 12.0, *)
@available(macOS 10.14, *)
@available(iOS 12.0, *)
public class SKSubscriptionGroup
{
Expand All @@ -28,7 +30,12 @@ public class SKSubscriptionGroup

init(with products: Set<SKProduct>)
{
self.identifier = products.first?.subscriptionGroupIdentifier ?? ""
guard let gid = products.first?.subscriptionGroupIdentifier else
{
fatalError("All products must have subscriptionGroupIdentifier")
}

self.identifier = gid
self.products = products
}

Expand All @@ -50,7 +57,9 @@ public class SKSubscriptionGroup

public typealias GroupIdentifier = String

@available(tvOS 12.0, *)
@available(iOS 12.0, *)
@available(macOS 10.14, *)
public extension SKProductsResponse
{
/// Build a `SKSubscriptionGroup` object
Expand Down Expand Up @@ -118,6 +127,8 @@ public extension SKProductsResponse
}
}

@available(tvOS 12.0, *)
@available(macOS 10.14, *)
public extension InAppReceipt
{

Expand Down

0 comments on commit 0dcd33f

Please sign in to comment.