A super simple tool for macOS Swift developers to check validity of a Gumroad-issued software license keys
Requires macOS 12 because it uses async/await APIs.
If you really need it to have a completionHandler-based synchronous version, let me know
Swift-Gumroad-license-validator is available through Swift Package Manager.
- In Xcode, click File > Add Packages...
- Select GitHub under Source Control Accounts
- Search for Swift-Gumroad-license-validator
- Click "Add Package" in bottom right
import GumroadLicenseValidator
let licenseKeyToCheck = "XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX"
let client = GumroadClient(productPermalink: "your product permalink")
await client?.isLicenseKeyValid(licenseKeyToCheck)
Go to your product page on Gumroad.
If your product URL is "https://gumroad.com/l/QMGY" your product_permalink would be "QMGY."
- Log in to your Gumroad account, open your product
- Click the URL underneath your product's name to open the page
- Click the purchase button ("I want this”, ”Buy”, or whatever you set it up to be)
- You will see a checkout window with test card information already entered
- Confirm the purchase, and then click “View content” to get the code (you'll also get it in an email)
If you're using this package it means you've decided to sell your app on Gumroad. May you have an exciting launch and many sales! Good luck! I'd love it if you let me know about your app, @DanielKasaj on Twitter.
Swift-Gumroad-license-validator is available under the MIT license. See the LICENSE file for more information.