SwiftyStoreKit
SwiftyStoreKit copied to clipboard
eliminate background taskground task issue on iOS
When I call fetchReceipt
, I get a warning about not ending a background task (SKReceiptRefreshRequest
).
Background Task 5 ("SKReceiptRefreshRequest"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this.
by canceling refreshReceiptRequest
in the deinit
, the warning is eliminated.
This is a great addition, should be merged!