In-App Purchases: Non-Renewing Subscriptions Tutorial

Learn to offer access to time-limited content to users and monetize your app using In-App Purchases in this Non-Renewing Subscriptions Tutorial. By Owen L Brown.

Leave a rating/review
Save for later
Share

  1. Consumables: User purchases the same product multiple times. Often they’re “used up” and bought again. Examples are currency in a free-to-play game, or healing potions, extra lives, etc.
  2. Non-consumables: User buys once (and only once), then has access to the item forever. Examples are an extra level pack or some downloadable content.
  3. Auto-renewable Subscriptions: Dynamic content or ongoing service accessible for a set period – making the user purchase a subscription to continue access. Examples are subscribing to an electronic magazine, subscribing to unlock an extra feature in an app for a month, etc. These subscriptions are automatically renewed by Apple indefinitely until the user decides to cancel.
  4. Non-renewing Subscriptions: Time-limited access to a service or content that may be static. User needs to manually renew subscription after it’s expired.

There are two types of subscriptions: auto-renewable and non-renewing. This tutorial focuses on non-renewing subscriptions.

Note: In recent years, auto-renewing subscriptions have gone through major changes. Initially they were limited mostly to Newsstand apps, later expanded to include a few more categories with very strict rules and now with the introduction of iOS 10 a broader range of apps can take advantage of this type. Its important to point out the advantages of auto-renewing over non-renewing subscriptions to assist in your decision of which to use. The pros and cons are discussed in a bit.

In this tutorial, you’ll add non-renewing subscriptions to an app called “InsomniOwl”, an app that allows you to browse owl comics. You’ll also be using Parse Server with Heroku as a back-end provider for the app to keep track of users and their purchased subscriptions.

Before beginning, you should be sure to complete, or have experience equivalent to:

If you’re ready to level-up your IAP mastery, read on!

When to Use Non-Renewing Subscriptions

It may seem obvious, but here’s a bit more about the type of subscriptions in iOS.

Auto-renewable subscriptions

When a user signs up for an auto-renewable subscription, they’re continually charged until they manually cancel it. This is obviously great from a developer’s point of view, because it takes a lot more effort to cancel something than to just let it continue. This means that Apple allows you to set a subscription duration and manage renewals automatically through the StoreKit framework.

Apple also has revenue incentives for developers using auto-renewing. If a subscriber continues an auto-renewing subscription past the first year, then Apple will increase the developers part of the cash from 70% to 85%.

As of iOS 10, auto-renewing subscriptions are no longer restricted to Newsstand type apps, but is now allowed for all app categories.

Non-renewing subscriptions

When a user signs up for a non-renewing subscription, they subscribe for a set period of time (1 month, 3 months, etc). When the time runs out, their access to the content ends. To continue to access the content, they have to re-subscribe.

This is not ideal from a developer’s point of view as it forces customers to have to continually make the decision to subscribe. It also means your code must keep track of the expiration date, which can get a bit tricky with users having multiple devices.

So far it seems that non-renewing subscriptions cause more work without offering any advantages. In many cases this may be true, but there are situations where it still makes sense. For example, if the subscription gives users access to a static archive which doesn’t provide a benefit for long term access. Other examples may be apps providing seasonal information, like garden planting tips or winter elk hunting expedition info. These are cases where maintaining the subscription is only applicable to the user for a period of a month or so.

Implementing Non-Renewing Subscriptions: Overview

All right, so you’ve decided you want to begin building your non-renewing subscription empire. What does this mean when it comes to the nitty-gritty of development?

Unlike auto-renewable subscriptions, where the StoreKit framework handles subscription durations and renewals, non-renewing subscriptions require you to do all the heavy lifting.

Non-Renewing Subscriptions Tutorial

Here are some things to consider when implementing non-renewing subscriptions:

iCloud. Since the user’s iCloud account is exclusive to them, but shared across their devices, this is a simple and effective option. However, if your app is cross-platform, or has a companion web app, this won’t be the best choice since iCloud restricts usage to iOS devices.

Backend as a service, or BaaS. By requiring a user to create an account in order to subscribe, you can store any necessary data, such as the subscription expiry date, against their account on the server. This method will allow you to share a subscription across all platforms simply, by requiring a user to log in.

  • The subscription duration is not managed for you by StoreKit, so you’ll need a way of calculating the duration at the point of purchase.
  • As with consumable products, your users should be able to purchase items multiple times. Thus, you’ll need a way of determining if there’s time remaining on an existing subscription, and including that time in any new duration, should a user choose to renew.
  • You’re also required to make the subscription available to any device owned by the user. There are generally two feasible options you can use to accommodate this requirement:

In this tutorial, you’ll be using Migrating to Parse Server with Heroku as the backend to store this information, as it is very popular and easy to use. Time to get started!

Getting Started

When you’re ready to begin, download the starter project here.
The starter project already has the basics for IAP, such as StoreKit handling, some product ids, and others. It also contains the code required for logging into the Parse Server, but everything directly related to non-renewing subscriptions and setting up the server has yet to be implemented.

Take a peak at the To Do List below to get an idea of the steps you will be taking.

Owen L Brown

Contributors

Owen L Brown

Author

Darren Ferguson

Tech Editor

Essan Parto

Final Pass Editor

Andy Obusek

Team Lead

Over 300 content creators. Join our team.