purchases-unity

Unity in-app purchases and subscriptions made easy.

MIT License

Stars
91
Committers
20

Bot releases are hidden (Show)

purchases-unity - 3.5.4

Published by NachoSoto 11 months ago

Update purchases-ios to version 3.14.4

purchases-unity - 4.5.0

Published by tonidero almost 2 years ago

Other Changes

  • [AUTOMATIC] Updates purchases-hybrid-common to 4.4.0 (#172) via RevenueCat Git Bot (@RCGitBot)
  • Makes hold job depend on tests (#170) via Cesar de la Vega (@vegaro)
  • Adds missing parameter to bump_version_update_changelog_create_pr (#169) via Cesar de la Vega (@vegaro)
purchases-unity - 4.1.0

Published by aboedo about 2 years ago

  • Introduced New AdServices Integration on iOS. Call EnableAdServicesAttributionTokenCollection() to enable this integration.
    More information in our docs and in the announcement blogpost.
purchases-unity - 4.0.0

Published by aboedo about 2 years ago

RevenueCat Unity SDK v4 is here!!

Dancing cats

Full Changelog

Amazon Appstore Support

We have introduced support for using the Amazon Appstore. We have extensively tested this, and there are some apps using our pre-release Amazon versions in production.

However, we have found some inconsistencies in the way Amazon Appstore prices are reported. We are actively working on patching these inconsistencies.

Please help us help you by reporting any issues you find. New RevenueCat Issue.

You can enable Amazon Appstore support by configuring the SDK using the new RevenueCatAPIKeyAmazon field.

For more information around configuration please take a look at the Amazon Appstore section in our docs. The official Amazon In-App Purchasing docs also contain very valuable information, especially around testing and best practices.

⚠️ ⚠️ Important ⚠️ ⚠️ In order to use Unity IAP < 4.4.0 with RevenueCat in Observer mode,
you need to use the Purchases-UnityIAP.unityPackage. For Unity IAP >= 4.4.0, you can use the Purchases.unitypackage package.

For Amazon installation instructions please follow take a look at the Amazon instructions document

StoreKit 2 support

This version of the SDK automatically uses StoreKit 2 APIs under the hood only for APIs that the RevenueCat team has determined work better than StoreKit 1.

New types and cleaned up naming

New types that wrap native types from Apple, Google and Amazon, and we cleaned up the naming of other types and methods for a more consistent experience.

Removed APIs

  • Identify and CreateAlias have been removed in favor of LogIn.
  • Reset has been removed in favor of LogOut.
  • GetEntitlements has been removed in favor of GetOfferings.
  • AttributionKey and Purchases.AddAttributionData have been removed in favor of Set<NetworkID> methods.
  • revenueCatAPIKey has been removed in favor of revenueCatAPIKeyApple, revenueCatAPIKeyGoogle and revenueCatAPIKeyAmazon.

Renamed APIs

3.x 4.0.0
PurchaserInfo CustomerInfo
Transaction StoreTransaction
Product StoreProduct
PaymentDiscount PromotionalOffer
Purchases.RestoreTransactions Purchases.RestorePurchases
Purchases.GetPaymentDiscount Purchases.GetPromotionalOffer
Purchases.UpdatedPurchaserInfoListener Purchases.UpdatedCustomerInfoListener
Discount.identifier Discount.Identifier
Discount.price Discount.Price
Discount.priceString Discount.PriceString
Discount.cycles Discount.Cycles
Discount.period Discount.Period
Discount.unit Discount.Unit
Discount.periodUnit Discount.PeriodUnit
Discount.periodNumberOfUnits Discount.PeriodNumberOfUnits
Error.message Error.Message
Error.code Error.Code
Error.underlyingErrorMessage Error.UnderlyingErrorMessage
Error.readableErrorCode Error.ReadableErrorCode

New APIs

Other

purchases-unity - 4.0.0-rc.2

Published by vegaro about 2 years ago

New changes since Release Candidate 1

  • Updated purchases-hybrid-common to 3.3.0 Changelog here
  • Updated purchases-android to 5.3.0, which fixes a null pointer exception when calling configure from a thread in Android. Changelog here
  • Updated instructions for observer mode, which don't require excluding the billing client anymore.
purchases-unity - 4.0.0-rc.1

Published by taquitos over 2 years ago

4.0.0-rc.1

⚠️ ⚠️ Important ⚠️ ⚠️ Observer mode for Amazon is not supported yet.

⚠️ ⚠️ Important ⚠️ ⚠️ In order to use Unity IAP with RevenueCat in Observer mode,
you need to use the Purchases-UnityIAP.unityPackage.

For Amazon installation instructions please follow take a look at the Amazon instructions document

Features

Amazon Appstore Support

We have introduced support for using the Amazon Appstore. We have extensively tested this, and there are some apps using our pre-release Amazon versions in production.

However, we have found some inconsistencies in the way Amazon Appstore prices are reported. We are actively working on patching these inconsistencies.

Please help us help you by reporting any issues you find. New RevenueCat Issue.

You can enable Amazon Appstore support by configuring the SDK using the new RevenueCatAPIKeyAmazon field.

For more information around configuration please take a look at the Amazon Appstore section in our docs. The official Amazon In-App Purchasing docs also contain very valuable information, especially around testing and best practices.

StoreKit 2 support

This version of the SDK automatically uses StoreKit 2 APIs under the hood only for APIs that the RevenueCat team has determined work better than StoreKit 1.

New types and cleaned up naming

New types that wrap native types from Apple, Google and Amazon, and we cleaned up the naming of other types and methods for a more consistent experience.

Removed APIs

  • Identify and CreateAlias have been removed in favor of LogIn.
  • Reset has been removed in favor of LogOut.
  • GetEntitlements has been removed in favor of GetOfferings.
  • AttributionKey and Purchases.AddAttributionData have been removed in favor of Set<NetworkID> methods.
  • revenueCatAPIKey has been removed in favor of revenueCatAPIKeyApple, revenueCatAPIKeyGoogle and revenueCatAPIKeyAmazon.

Renamed APIs

3.x 4.0.0
PurchaserInfo CustomerInfo
Transaction StoreTransaction
Product StoreProduct
PaymentDiscount PromotionalOffer
Purchases.RestoreTransactions Purchases.RestorePurchases
Purchases.GetPaymentDiscount Purchases.GetPromotionalOffer
Purchases.UpdatedPurchaserInfoListener Purchases.UpdatedCustomerInfoListener
Discount.identifier Discount.Identifier
Discount.price Discount.Price
Discount.priceString Discount.PriceString
Discount.cycles Discount.Cycles
Discount.period Discount.Period
Discount.unit Discount.Unit
Discount.periodUnit Discount.PeriodUnit
Discount.periodNumberOfUnits Discount.PeriodNumberOfUnits
Error.message Error.Message
Error.code Error.Code
Error.underlyingErrorMessage Error.UnderlyingErrorMessage
Error.readableErrorCode Error.ReadableErrorCode
purchases-unity - 3.5.3

Published by vegaro over 2 years ago

When installing this release, make sure to make a fresh installation by removing the RevenueCat folder before importing the package. That way obsolete files are deleted from your project.

purchases-unity -

Published by vegaro over 2 years ago

  • Added currency code and price to syncObserverModeAmazonPurchase

For Amazon installation instructions please follow take a look at the Amazon instructions document

purchases-unity - 3.5.2

Published by aboedo over 2 years ago

⚠️ Note: ⚠️
This version of the SDK doesn't have support for Amazon Store. If you would like to use our SDK with Amazon Store, use the version tagged amazon-latest and follow the AMAZON-INSTRUCTIONS.md docs to get set up.

purchases-unity - 3.2.0-amazon.alpha.5 (for Unity IAP observer mode compatibility)

Published by vegaro over 2 years ago

  • Added DangerousSetting option to disable automatic syncing of purchases. Use only if instructed by RevenueCat support.
  • Amazon configured in observer mode won't register purchases automatically.
  • Fixed Amazon observer mode by adding syncObserverModeAmazonPurchase to manually sync an Amazon purchase with our backend.
  • Updated purchases-hybrid-common android version to 2.0.0-amazon.alpha.5.billing3.iap2
  • Updated purchases-hybrid-common iOS version to 2.0.0

For Amazon installation instructions please follow take a look at the Amazon instructions document

purchases-unity - 3.5.1

Published by aboedo over 2 years ago

purchases-unity - 3.2.0 With Amazon Support (Alpha)

Published by vegaro almost 3 years ago

Important

⚠️ ⚠️ ⚠️
We've noticed this version doesn't work properly alongside Unity IAP and we do not recommend its usage in observer mode.
⚠️ ⚠️ ⚠️


This release adds pre-release support for Amazon store. It's based off 3.2.0 since that's the latest version compatible with Unity IAP 4.1.2. Unity IAP hasn't been updated to BillingClient 4, and the latest purchases-unity version compatible with BillingClient 3 is 3.2.0

In order to be able to use this release you need an Amazon specific public key. You need to have access to the private beta of the platforms UI. Contact RevenueCat support if you want to have access.

Instructions

  • Download the .unitypackage in the release
  • Open your Unity Project
  • Select Import package -> Custom package
  • Select Purchases_Amazon.unityPackage and make sure all of the files are selected and press import
  • If Package Manager Resolver asks to solve conflicts, choose library versions and select OK

  • If your app also targets the Google Play Store, you will want to conditionally exclude the BillingClient to prevent duplicated classes. If you don't have a mainTemplate.gradle, make sure you have Custom Main Gradle Template selected in the Android Player Settings, which should create a mainTemplate.gradle inside the Assets/Plugins/Android. Add the following to your mainTemplate.gradle to prevent duplicated classes when Unity IAP is targeting the Play Store:

dependencies {
    ...
    
    // ** ADD THIS **
    if (!project(":unityLibrary").fileTree(dir: 'libs', include: ['billing-3*.aar']).isEmpty()) {
        configurations.all {
            exclude group: 'com.android.billingclient', module: 'billing'
        }
    }
}
  • Perform a Resolve using the editor option Assets/External Dependency Manager/Android Resolver/Resolve menu. This will add the right dependencies to the mainTemplate.gradle. Your mainTemplate.gradle should look like this (there might be more dependencies from other plugins you might use):
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    // Exclude billing client if it's already in the project
    if (!project(":unityLibrary").fileTree(dir: 'libs', include: ['billing-3*.aar']).isEmpty()) {
        configurations.all {
            exclude group: 'com.android.billingclient', module: 'billing'
        }
    }
// Android Resolver Dependencies Start
    implementation 'androidx.annotation:annotation:[1.2.0]' // Assets/RevenueCat/Plugins/Editor/RevenueCatDependencies.xml:5
    implementation 'com.revenuecat.purchases:purchases-hybrid-common:[2.0.0-amazon.alpha.4.billing3.iap2]' // Assets/RevenueCat/Plugins/Editor/RevenueCatDependencies.xml:4
// Android Resolver Dependencies End
**DEPS**}
  • In observer mode, adding the Amazon in-app-purchasing library is not necessary since it will be added by Unity IAP when targeting the Amazon Store

  • Select Use Amazon in the Editor

If calling setup on runtime, you can select “Use Runtime Setup” and call setup this way.

       var builder = PurchasesConfiguration.Builder.Init("amazon_specific_api_key")
            .SetUseAmazon(true);
        purchases.Setup(builder.Build());

Due to some limitations, RevenueCat will only validate purchases made in production or in Live App Testing and won't validate purchases made with the Amazon App Tester. You can read more about the different testing environments in our Amazon (Beta) docs.

purchases-unity - 3.5.0

Published by aboedo almost 3 years ago

What's Changed

Full Changelog: https://github.com/RevenueCat/purchases-unity/compare/3.4.2...3.5.0

purchases-unity -

Published by vegaro almost 3 years ago

purchases-unity -

Published by vegaro about 3 years ago

purchases-unity - 3.4.0

Published by vegaro about 3 years ago

purchases-unity - 3.3.0

Published by aboedo about 3 years ago

3.3.0

Identity V3:

In this version, we’ve redesigned the way that user identification works.
Detailed docs about the new system are available here.

New methods

  • Introduces LogIn, a new way of identifying users, which also returns whether a new user has been registered in the system.
    LogIn uses a new backend endpoint.
  • Introduces LogOut, a replacement for Reset.

Deprecations

Other

purchases-unity - 3.2.0

Published by beylmk over 3 years ago

purchases-unity - 3.1.1

Published by aboedo over 3 years ago

purchases-unity - 3.1.0

Published by aboedo over 3 years ago

Badges
Extracted from project README
openupm
Related Projects