Skip to content

Instantly share code, notes, and snippets.

@sonjh1217
Created April 28, 2021 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sonjh1217/094c6718df631ec1ee7714a6c3d2b4f6 to your computer and use it in GitHub Desktop.
Save sonjh1217/094c6718df631ec1ee7714a6c3d2b4f6 to your computer and use it in GitHub Desktop.
class IAPManager {
func receipt() -> NSData? {
if let receiptURL = Bundle.main.appStoreReceiptURL,
FileManager.default.fileExists(atPath: receiptURL.path) {
return NSData(contentsOf: receiptURL)
}
return nil
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment