 
 public typealias IAPRefreshRequestResult = ((Error?) -> ())
 
+@available(watchOSApplicationExtension 6.2, *)
 fileprivate class RefreshSession : NSObject, SKRequestDelegate
 {
     private let receiptRefreshRequest = SKReceiptRefreshRequest()
     private var completion: IAPRefreshRequestResult?
     
-    private var backgroundTaskID: UIBackgroundTaskIdentifier?
     
     override init()
     {
         super.init()
-        
-        #if targetEnvironment(macCatalyst) || os(iOS) || os(tvOS)
-        
-        #endif
-        
-        self.backgroundTaskID = UIApplication.shared.beginBackgroundTask (withName: "IARRefreshTask")
-        {
-            UIApplication.shared.endBackgroundTask(self.backgroundTaskID!)
-            self.backgroundTaskID = UIBackgroundTaskIdentifier.invalid
-        }
-        
+
         receiptRefreshRequest.delegate = self
     }
     

import Foundation
import StoreKit

fileprivate var refreshSession: RefreshSession?

public extension InAppReceipt

    *  Refresh local in-app receipt
    *  - Parameter completion: handler for result
    */
    @available(watchOSApplicationExtension 6.2, *)
    static func refresh(completion: @escaping IAPRefreshRequestResult)
    {
        if refreshSession != nil { return }
