Last active
July 8, 2020 19:19
-
-
Save ren6/88c3b3547ffe0fc2a9add62714c27a9f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func expirationDateFor(_ identifier : String) -> Date?{ | |
return UserDefaults.standard.object(forKey: identifier) as? Date | |
} | |
let subscriptionDate = IAPManager.shared.expirationDateFor("YOUR_PRODUCT_ID") ?? Date() | |
let isActive = subscriptionDate > Date() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment