-
Notifications
You must be signed in to change notification settings - Fork 3
Replace warning about not being able to transfer projects with how to transfer #689
base: main
Are you sure you want to change the base?
Conversation
PreviewsSee contentsRegister for a free accountRevenueCat accounts are free to set up, all you need is an email address. [block:html] Configure a new ProjectA Project is a set of Apps, and Apps are paired with a single platform. For example, a typical Project might contain one iOS App and one Google Play Store App. All Apps within one Project share the same basic setup, including subscription status, integrations, and webhooks. [block:image] Creating a ProjectTo create a Project, click the '+ Create new project' button in the Projects dropdown panel at the top of the RevenueCat dashboard: [block:image] You can customize your project by setting a name as well as your global restore behavior for the apps in your Project. [block:image] Adding an App to a ProjectOnce you create a project you'll be prompted to add an App. Select the platform you wish to add and follow the configuration steps for that platform.
Shared App User ID NamespaceApps within the same Project share the same App User ID namespace, meaning all the apps can "share" purchases and subscription status. In other words, the subscription status is tied to the same App User ID regardless of which app it's set in. Transferring a Project to Another RevenueCat AccountTo transfer specific projects from one account to another, contact RevenueCat support for assistance. See contentsWhat is RevenueCat?RevenueCat provides a backend and a wrapper around StoreKit and Google Play Billing to make implementing in-app purchases and subscriptions easy. With our SDK, you can build and manage your app business on any platform without having to maintain IAP infrastructure. You can read more about how RevenueCat fits into your app or you can sign up free to start building. InstallationWe provide 2 ways to install our SDK: via Unity Package Manager (UPM) in the OpenUPM registry, or as a Option 1 (recommended): Install using OpenUPM
[block:callout] [block:callout] Configure a Main Gradle TemplateGo to Project -> Build Settings -> Player Settings -> Android tab -> Publishing Settings, and check "Custom Base Gradle Template", then close that window. Go to Assets -> External Dependency Manager -> Android Resolver -> Settings, then check "Patch mainTemplate.gradle" Option 2: Import the Purchases Unity packageDownload the latest version of Purchases.unitypackage. Import the downloaded unitypackage to your Unity project. Make sure the [block:callout] Configure a Main Gradle TemplateGo to Project -> Build Settings -> Player Settings -> Android tab -> Publishing Settings, and check "Custom Base Gradle Template", then close that window. Go to Assets -> External Dependency Manager -> Android Resolver -> Settings, then check "Patch mainTemplate.gradle" Create a GameObject with the Purchases behaviorThe Purchases package will include a MonoBehavior called Purchases. This will be your access point to RevenueCat from inside Unity. It should be instantiated once and kept as a singleton. You can use properties to configure your API Key, app user ID (if you have one), and product identifiers you want to fetch. Link StoreKit (iOS only)
Subclass Purchases.Listener MonoBehaviorThe Purchases behavior takes one additional parameter, a GameObject with a Purchases.Listener component. This will be where you handle purchase events, and updated subscriber information from RevenueCat. Here is a simple example: using System;
using System.Collections.Generic;
using UnityEngine;
public class PurchasesListener : Purchases.UpdatedCustomerInfoListener
{
public override void CustomerInfoReceived(Purchases.CustomerInfo customerInfo)
{
// display new CustomerInfo
}
private void Start()
{
var purchases = GetComponent<Purchases>();
purchases.SetDebugLogsEnabled(true);
purchases.GetOfferings((offerings, error) =>
{
if (error != null)
{
// show error
}
else
{
// show offering
}
});
}
public void BeginPurchase(Purchases.Package package)
{
var purchases = GetComponent<Purchases>();
purchases.PurchasePackage(package, (productIdentifier, customerInfo, userCancelled, error) =>
{
if (!userCancelled)
{
if (error != null)
{
// show error
}
else
{
// show updated Customer Info
}
}
else
{
// user cancelled, don't show an error
}
});
}
void RestoreClicked()
{
var purchases = GetComponent<Purchases>();
purchases.RestorePurchases((customerInfo, error) =>
{
if (error != null)
{
// show error
}
else
{
// show updated Customer Info
}
});
}
} Unity EditorRunning the Purchases SDK is unsupported in the Unity Editor at this time, and may result in Proguard rulesIf you have enabled Minify in Unity, make sure to add these custom rules to your
Installation with Unity IAP side by side[block:callout] Purchases Unity 5.0.0+side by side with Unity IAP 4.8.0 This version is only compatible with version 4.8.0 and above of Unity IAP which are the ones that include BillingClient 5. To install download If using RevenueCat alongside Unity IAP 2.2.0+ or other plugin that includes the Android BillingClient library you will be getting an error when compiling that warns about some BillingClient classes being duplicated. The easiest way to remove the error would be to tell Gradle to not include the billingclient library that Unity IAP is already including. In order to do that, make sure you have Modify the dependencies {
...
// ** ADD THIS **
configurations.all {
exclude group: 'com.android.billingclient', module: 'billing'
}
} Perform a clean up of the resolved dependencies using the Also make sure to perform a resolve, so External Dependency Manager adds the right dependencies to the generated [block:callout] Troubleshooting "ClassNotFoundException" errors at Runtime in AndroidWhen exporting your project to Android, in the Build Settings window, make sure you uncheck the Installing old versions of the pluginPurchases Unity 4.2.0+side by side with Unity IAP 4.4.0 < 4.8.0 Download Purchases Unity 4.0.0 and 4.1.0side by side with Unity IAP 3.3.0 < 4.4.0 Download Next Steps
|
Apps within the same Project share the same App User ID namespace, meaning all the apps can "share" purchases and subscription status. In other words, the subscription status is tied to the same App User ID regardless of which app it's set in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why this was flagged for an update, maybe a trailing space or something
|
||
To transfer specific projects from one account to another, [contact RevenueCat support](https://app.revenuecat.com/settings/support) for assistance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I purposefully didn't link out to https://community.revenuecat.com/featured-articles-55/transferring-apps-in-revenuecat-644?tid=644&fid=55 because that one contains more transfer options and is also a little outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good!
Motivation / Description
The docs were saying that projects can't be transferred but that's outdated, we can now. I added a new section about transferring projects
Changes introduced