RevenueCat

Build With RevenueCat

Build a customized mobile subscription business with RevenueCat. We do the heavy lifting of normalizing subscribers from any source and maintain a single source of truth for subscription status, so you can get back to building your app.

RevenueCat is a powerful, secure, reliable, and free to use in-app purchase server with global support. All you need to get started is an API key.

macOS / Catalyst

Instructions for installing Purchases SDK for macOS / Catalyst

What is RevenueCat?

RevenueCat is a scalable backend for in-app subscriptions and purchases. With RevenueCat, you can build and manage your app business without having to set up or maintain any purchase infrastructure. Here you can read more about how RevenueCat fits into your app.

As of March 2020, RevenueCat only supports universal purchases for macOS apps. This allows you to seamlessly share purchases between iOS, tvOS, watchOS, and macOS versions of your apps. If you need support for the legacy Mac App Store purchases, contact support.

Requirements

XCode 10.2+
Minimum target: macOS 10.12+

Installation

The Purchases iOS SDK is also compatible with macOS, and can be installed either via CocoaPods or Swift Package Manager.

Carthage is currently uncompatible with Catalyst

Once Carthage is updated to support Catalyst, installing with Carthage will be restored. The recommended way to install the Purchases iOS SDK for Catalyst projects is to use Swift Package Manager.

Install via CocoaPods

Add the following to your Podfile:

pod 'Purchases', '3.2.1'

And then run:

pod install

This will add Purchases.framework to your workspace.

Install via Swift Package Manager

You can use Swift Package Manager to add Purchases to your Xcode project. Select File » Swift Packages » Add Package Dependency... and specify the repository URL of the Purchases library: https://github.com/RevenueCat/purchases-ios.git. Set the version to Up to next major and choose the target where you want to use it. The library should have been added to the Swift Package Dependencies section and you should be able to import it now.

Importing Purchases

You should now be able import Purchases

import Purchases
#import "RCPurchases.h"

Enable In-App Purchase for your project

Don't forget to enable the In-App Purchase capability for your project under Project Target -> Capabilities -> In-App Purchase

Next Steps

Updated 10 days ago

macOS / Catalyst


Instructions for installing Purchases SDK for macOS / Catalyst

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.