SwiftyStoreKit icon indicating copy to clipboard operation
SwiftyStoreKit copied to clipboard

eliminate background taskground task issue on iOS

Open mohammad-rahchamani opened this issue 2 years ago • 3 comments

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.

mohammad-rahchamani avatar Dec 14 '21 11:12 mohammad-rahchamani

This is a great addition, should be merged!

frogg avatar Nov 26 '22 17:11 frogg