2022-01-21 14:58:07 -03:00
# ``RevenueCat``
😻 In-App Subscriptions Made Easy 😻
## Overview
RevenueCat is a powerful, reliable, and free to use in-app purchase server with cross-platform support. Our open-source framework provides a backend and a wrapper around StoreKit and Google Play Billing to make implementing in-app purchases and subscriptions easy.
Whether you are building a new app or already have millions of customers, you can use RevenueCat to:
* Fetch products, make purchases, and check subscription status with our [native SDKs ](https://docs.revenuecat.com/docs/installation ).
* Host and [configure products ](https://docs.revenuecat.com/docs/entitlements ) remotely from our dashboard.
* Analyze the most important metrics for your app business [in one place ](https://docs.revenuecat.com/docs/charts ).
* See customer transaction histories, chart lifetime value, and [grant promotional subscriptions ](https://docs.revenuecat.com/docs/customers ).
* Get notified of real-time events through [webhooks ](https://docs.revenuecat.com/docs/webhooks ).
* Send enriched purchase events to analytics and attribution tools with our easy integrations.
Sign up to [get started for free ](https://app.revenuecat.com/signup ).
### RevenueCat SDK Features
| | RevenueCat |
| --- | --- |
✅ | Server-side receipt validation
➡️ | [Webhooks ](https://docs.revenuecat.com/docs/webhooks ) - enhanced server-to-server communication with events for purchases, renewals, cancellations, and more
2022-02-25 14:45:19 -03:00
🖥 | iOS, tvOS, macOS and watchOS support
2022-01-21 14:58:07 -03:00
🎯 | Subscription status tracking - know whether a user is subscribed whether they're on iOS, Android or web
📊 | Analytics - automatic calculation of metrics like conversion, mrr, and churn
📝 | [Online documentation ](https://docs.revenuecat.com/docs ) up to date
🔀 | [Integrations ](https://www.revenuecat.com/integrations ) - over a dozen integrations to easily send purchase data where you need it
💯 | Well maintained - [frequent releases ](https://github.com/RevenueCat/purchases-ios/releases )
📮 | Great support - [Help Center ](https://community.revenuecat.com )
2022-01-31 12:45:04 -03:00
- Important: You're viewing the documentation for RevenueCat iOS SDK version 4.
For documentation on version 3, visit [the docs for RevenueCat iOS SDK version 3. ](https://sdk.revenuecat.com/ios/index.html )
2022-02-10 14:17:41 -03:00
## Migrating from Purchases v3
When transitioning between our V3 SDK, we ported our entire SDK into Swift.
Migrating from Objective-C to Swift required a number of API changes, but we feel that the
changes resulted in the SDK having a more natural feel for developers. In addition,
we introduced several new types and APIs.
Our <doc:V4_API_Migration_guide> provides information on how to migrate from V3 to V4.
2022-01-21 14:58:07 -03:00
## Getting Started
For more detailed information, you can view our complete documentation at [docs.revenuecat.com ](https://docs.revenuecat.com/docs ).
Or browse our iOS sample apps:
2022-02-14 12:12:55 -08:00
- [MagicWeather ](https://github.com/RevenueCat/purchases-ios/tree/main/Examples/MagicWeather )
- [MagicWeather SwiftUI ](https://github.com/RevenueCat/purchases-ios/tree/main/Examples/MagicWeatherSwiftUI )
2022-01-21 14:58:07 -03:00
## Topics
### Purchases
- ``Purchases` `
### Configuring the SDK
- ``Purchases/configure(withAPIKey:)` `
2022-06-21 12:34:11 -07:00
- ``Purchases/configure(with:)-6oipy` `
2022-10-27 12:00:53 -07:00
- ``PurchasesDiagnostics` `
2022-01-21 14:58:07 -03:00
### Displaying Products
- ``Offerings` `
- ``Offering` `
- ``Package` `
- ``StoreProduct` `
- ``SubscriptionPeriod` `
- ``Purchases/offerings()` `
- ``Purchases/getOfferings(completion:)` `
- ``Purchases/products(_:)` `
- ``Purchases/getProducts(_:completion:)` `
### Making Purchases
- ``StoreTransaction` `
- ``Purchases/purchase(package:)` `
- ``Purchases/purchase(package:completion:)` `
- ``Purchases/purchase(product:)` `
- ``Purchases/purchase(product:completion:)` `
2022-01-31 11:10:21 -03:00
### Making Purchases with Subscription Offers
2022-01-21 14:58:07 -03:00
- ``IntroEligibility` `
2022-02-15 09:43:14 -08:00
- ``PromotionalOffer` `
2022-01-21 14:58:07 -03:00
- ``StoreProductDiscount` `
2022-03-09 13:12:02 -08:00
- ``Purchases/checkTrialOrIntroDiscountEligibility(productIdentifiers:)` `
- ``Purchases/checkTrialOrIntroDiscountEligibility(productIdentifiers:completion:)` `
2022-03-04 15:56:15 -05:00
- ``Purchases/checkTrialOrIntroDiscountEligibility(product:)` `
- ``Purchases/checkTrialOrIntroDiscountEligibility(product:completion:)` `
2022-03-22 10:24:35 -04:00
- ``Purchases/promotionalOffer(forProductDiscount:product:)` `
2022-02-15 09:43:14 -08:00
- ``Purchases/getPromotionalOffer(forProductDiscount:product:completion:)` `
- ``Purchases/purchase(package:promotionalOffer:)` `
- ``Purchases/purchase(package:promotionalOffer:completion:)` `
- ``Purchases/purchase(product:promotionalOffer:)` `
- ``Purchases/purchase(product:promotionalOffer:completion:)` `
2022-01-21 14:58:07 -03:00
### Subscription Status
- ``CustomerInfo` `
- ``EntitlementInfo` `
- ``EntitlementInfos` `
- ``PurchasesDelegate` `
- ``Purchases/getCustomerInfo(completion:)` `
2022-05-31 15:26:17 -07:00
- ``Purchases/customerInfo(fetchPolicy:)` `
2022-01-31 11:10:21 -03:00
- ``Purchases/customerInfoStream` `
2022-01-21 14:58:07 -03:00
### Identifying Users
2022-10-26 14:43:43 -07:00
- ``Purchases/logIn(_:)-arja` `
- ``Purchases/logIn(_:completion:)-4km90` `
2022-01-21 14:58:07 -03:00
- ``Purchases/logOut()` `
- ``Purchases/logOut(completion:)` `
### Managing Subscriptions
- ``Purchases/syncPurchases()` `
- ``Purchases/syncPurchases(completion:)` `
- ``Purchases/restorePurchases()` `
- ``Purchases/restorePurchases(completion:)` `
- ``Purchases/beginRefundRequestForActiveEntitlement()` `
- ``Purchases/beginRefundRequest(forEntitlement:)` `
- ``Purchases/beginRefundRequest(forProduct:)` `
- ``Purchases/showManageSubscriptions()` `
- ``Purchases/showManageSubscriptions(completion:)` `
2022-12-22 10:09:12 -08:00
### Parsing Receipts
- ``PurchasesReceiptParser` `
- ``AppleReceipt` `
2022-01-21 14:58:07 -03:00
### Subscriber Attributes
- ``Purchases/setAttributes(_:)` `
- ``Purchases/setAd(_:)` `
- ``Purchases/setEmail(_:)` `
- ``Purchases/setDisplayName(_:)` `
- ``Purchases/setKeyword(_:)` `
- ``Purchases/setCampaign(_:)` `
- ``Purchases/setCreative(_:)` `
- ``Purchases/setAdGroup(_:)` `
- ``Purchases/setPushToken(_:)` `
2022-04-25 14:20:50 -03:00
- ``Purchases/setPushTokenString(_:)` `
2022-01-21 14:58:07 -03:00
- ``Purchases/setMediaSource(_:)` `
- ``Purchases/setPhoneNumber(_:)` `
- ``Purchases/setAttributes(_:)` `
2022-01-31 11:10:21 -03:00
- ``Purchases/collectDeviceIdentifiers()` `
2022-01-21 14:58:07 -03:00
### Integrations
- ``Purchases/setAdjustID(_:)` `
- ``Purchases/setAirshipChannelID(_:)` `
2022-04-25 15:04:24 -03:00
- ``Purchases/setAppsflyerID(_:)` `
- ``Purchases/setCleverTapID(_:)` `
- ``Purchases/setFBAnonymousID(_:)` `
- ``Purchases/setFirebaseAppInstanceID(_:)` `
- ``Purchases/setMixpanelDistinctID(_:)` `
2022-01-21 14:58:07 -03:00
- ``Purchases/setMparticleID(_:)` `
- ``Purchases/setOnesignalID(_:)` `
2022-05-27 10:24:38 -03:00
### Configuring the SDK with parameters (deprecated)
- ``Purchases/configure(withAPIKey:appUserID:)` `
- ``Purchases/configure(withAPIKey:appUserID:observerMode:)` `
- ``Purchases/configure(withAPIKey:appUserID:observerMode:userDefaults:)` `
- ``Purchases/configure(withAPIKey:appUserID:observerMode:userDefaults:useStoreKit2IfAvailable:)` `