Skip to content

Instantly share code, notes, and snippets.

@ren6
Last active July 8, 2020 19:19
Show Gist options
  • Save ren6/88c3b3547ffe0fc2a9add62714c27a9f to your computer and use it in GitHub Desktop.
Save ren6/88c3b3547ffe0fc2a9add62714c27a9f to your computer and use it in GitHub Desktop.
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