purchases-unity

Unity in-app purchases and subscriptions made easy.

MIT License

Stars
91
Committers
20

Bot releases are visible (Hide)

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

purchases-unity - Amazon Alpha Version

Published by vegaro over 3 years ago

  • Download the .unitypackage in this 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

  • Download the .zip from Amazon and unzip

  • Drag and drop the Amazon in-app-purchasing library into Assets -> Plugins -> Android

  • Select Use Amazon in the Editor

If calling setup on runtime, using Runtime Setup, 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.

purchases-unity - 3.0.1

Published by aboedo over 3 years ago

purchases-unity - 3.0.0

Published by aboedo almost 4 years ago

  • removes deprecated MakePurchase, replaced by PurchaseProduct
  • iOS:
    • added new method, syncPurchases, that enables syncing the purchases in the local receipt with the backend without risking a password prompt. The method was already available on Android.
    • added a new method, presentCodeRedemptionSheet, for offer codes redemption.
    • fixed a bug where values for dates in milliseconds were actually in seconds (https://github.com/RevenueCat/purchases-hybrid-common/pull/62)
  • Bumped purchases-hybrid-common to 1.5.0 Changelog here
  • Bumped purchases-ios to 3.9.2 Changelog here
  • Bumped purchases-android to 4.0.1 Changelog here
purchases-unity - 2.3.1

Published by aboedo almost 4 years ago

2.3.1

purchases-unity -

Published by vegaro about 4 years ago

  • Bumped common files to 1.4.4 Changelog here
  • Bumped iOS to 3.7.2 Changelog here
  • Bumped Android to 3.5.2 Changelog here
  • Added a new property NonSubscriptionTransactions in PurchaserInfo to better manage non-subscriptions
  • Attribution V2:
    • Deprecated addAttribution in favor of setAdjustId, setAppsflyerId, setFbAnonymousId, setMparticleId.
    • Added support for OneSignal via setOnesignalId
    • Added setMediaSource, setCampaign, setAdGroup, setAd, setKeyword, setCreative, and collectDeviceIdentifiers
  • Observer mode installations now are done same way as standard installations, there's no special package
purchases-unity -

Published by vegaro about 4 years ago

  • Fixes duplicated files error in iOS.
purchases-unity -

Published by vegaro about 4 years ago

  • Adds Subscriber Attributes, which allow developers to store additional, structured information
    for a user in RevenueCat. More info: https://docs.revenuecat.com/docs/user-attributes.
  • Added new method to invalidate the purchaser info cache, useful when promotional purchases are granted from outside the app.

iOS Native SDK Update 3.2.2

Android Native SDK Update 3.1.0

purchases-unity -

Published by vegaro about 4 years ago

  • Adds proxyURL property, useful for kids category apps, so that they can set up a proxy to send requests through. Do not use this unless you've talked to RevenueCat support about it.
  • Adds userDefaultsSuiteName. Set this to use a specific NSUserDefaults suite for RevenueCat. This might be handy if you are deleting all NSUserDefaults in your app and leaving RevenueCat in a bad state.
  • Update to ExternalDependencyManager 1.2.156
  • A lot of internal changes:
    • iOS now downloads the dependency from CocoaPods
    • Android downloads the common code from Maven
    • Removed a bunch of scripts
    • Removed the Android project and added the files to the plugin folder
    • Added platform version and name to the http headers
    • Added a script to create the unitypackage
    • Moved inner classes to their own files
    • Use SimpleJSON instead of JSONUtility
purchases-unity -

Published by vegaro almost 5 years ago

  • Fixes updated PurchaserInfo listener in iOS
purchases-unity -

Published by vegaro almost 5 years ago

  • Fixes active entitlements in iOS
  • Fixes dates formats inside EntitlementInfo in iOS
purchases-unity -

Published by vegaro almost 5 years ago

Adds missing optional type parameter to GetProducts

Badges
Extracted from project README
openupm
Related Projects