How to offer a free trial for a Mac app

Give a Mac app a time-limited free trial, stop reinstalls from restarting it with a verified email, and put a trial download button on your product page.

Updated 2 min read5 steps

A free trial lets people use the whole app before they pay. The hard part is the clock: it has to start once, survive a reinstall, and end on time. DeliveryKit keeps that clock, so your app only asks “is the trial still running?” and gets a signed answer.

Step 1: Set the trial length

Open the app’s file in DeliveryKit. With Require activation on, set Trial length in days. Fourteen is a common choice; zero turns the trial off.

Your app can read the setting at any time from GET /offer, so its welcome screen can say “free for 14 days” without the number being built in:

{
    "trial_requires_email": false,
    "trial_days": 14,
    "refund_days": 30,
    "purchase_url": "https://deliverykit.app/w/your-studio/products/kite"
}

Step 2: Start the trial from the app

One request, with the Mac’s device ID:

let (data, response) = try await post("trial", [
    "device_id": deviceID,
    "device_name": Host.current().localizedName ?? "Mac",
])

A 200 returns a license whose typ is trial and whose expiry is the end of the trial. Store and verify it exactly like a paid license, as in how to add license activation to a Mac app.

The trial runs from the first request. Calling again returns the same end date, so you can call it at every launch.

A 403 carries a reason. The two your app should handle are trial_ended, which is when to show your buy screen, and email_required, covered next.

Step 3: One trial per person, not per reinstall

A device ID is lost when someone deletes the app’s data. To tie the trial to a person, turn on Verify email before a trial. The app then asks for an address and a code, the same way activation does:

try await post("trial/request", ["email": email, "device_id": deviceID])
// the person types the six-digit code from the email
let (data, response) = try await post("trial/activate", ["email": email, "code": code, "device_id": deviceID])

Every Mac verified with that address shares one trial. A second Mac joins the days already running, and once they are used up no device can start them again with that email.

You also get the address. Trials are listed on the app file’s page with the email, the device, and whether each one is running, ended or activated.

Step 4: Put a trial download on your product page

Turn on Offer a free trial download for the product. Its page then shows a second button beside Buy that downloads the app itself. There is one build: the copy people try is the copy they later activate.

The same download is offered in the email DeliveryKit sends your waitlist when you launch.

Step 5: Turn a trial into a sale

When the trial ends, POST /trial answers trial_ended. Show a screen with two buttons:

  • Buy, which opens purchase_url from /offer
  • Activate, for someone who has already paid

After buying, the person activates with the email they paid with. Their trial shows as activated in your dashboard.

Start selling your first download

Connect your Stripe account and choose the files you want to sell. DeliveryKit sends buyers their downloads after payment.