Skip to content

Releases: RevenueCat/purchases-flutter

3.5.0

28 Oct 23:44
da38898
Compare
Choose a tag to compare
  • Removed call to Purchases.getSharedInstance().close(); in onDetachedFromEngine. This should fix an incompatibility with workmanager Flutter plugin that was causing the BillingClient to get disconnected after a task would finish.
  • Added a new close() function to be called in Android whenever the resources used by Purchases should be released.
    #268
    #257
  • Bumppurchases-hybrid-common to 1.9.3 Changelog here
  • Bump purchases-ios to 3.12.8
    3.12.8 Changelog here
    3.12.7 Changelog here

3.4.6

15 Oct 18:41
255ef75
Compare
Choose a tag to compare

3.4.6

amazon.alpha.2

06 Oct 03:00
Compare
Choose a tag to compare
amazon.alpha.2 Pre-release
Pre-release

Adds initial Amazon store support. In order to use please point to this tag in your pubspec.yaml like this:

dependencies:
  purchases_flutter:
    git:
      url: git://github.com/revenuecat/purchases-flutter.git
      ref: amazon.alpha.2

Then configure the package using your RevenueCat API key specific for Amazon and passing useAmazon: true:

await Purchases.setup(apiKey, appUserId: null, observerMode: false, useAmazon: true);

Modify your android/app/build.gradle to add a dependency to the official in-app-purchasing-2.0.76.jar

dependencies {
    implementation files('libs/in-app-purchasing-2.0.76.jar')

The next step would be to add the jar to your project. For that you can use the following gradle task that can be added to android/app/build.gradle and run via ./gradlew getAmazonLibrary or via Android Studio :

// Gradle task to download Amazon library
ext {
    iapVersion = "2.0.76"
}

task getAmazonLibrary {
    ext {
        downloadURL = "https://amzndevresources.com/iap/sdk/AmazonInAppPurchasing_Android.zip"
        fileToExtract = "in-app-purchasing-${iapVersion}.jar"
        destFile = new File( projectDir, "libs/$fileToExtract" )
    }

    inputs.property( 'downloadURL', downloadURL )
    inputs.property( 'fileToExtract', fileToExtract )
    outputs.file( destFile )

    doLast {
        File destDir = destFile.parentFile
        destDir.mkdirs()

        File downloadFile = new File( temporaryDir, 'download.zip' )
        new URL( downloadURL ).withInputStream { is ->
            downloadFile.withOutputStream { it << is }
        }

        project.copy {
            from {
                zipTree(downloadFile).matching { include "**/$fileToExtract" }.singleFile
            }

            into( destDir )
        }
    }
}

That gradle task will add the jar to the libs folder inside app:

I in-app-purchasing-2 0 76 jar

Alternatively, you can do this manually by downloading the .zip from Amazon and then unzipping and moving the in-app-purchasing-2.0.76.jar into your projects android/app/libs/ folder like in the screenshot above.

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.

3.4.5

07 Sep 23:24
d144e6e
Compare
Choose a tag to compare

3.4.4

01 Sep 00:18
dcf5567
Compare
Choose a tag to compare
  • Buggy release - meant to update purchases-hybrid-common to 1.9.1 (and therefore purchases-android to 4.3.1),
    but didn't end up actually pulling it in...fixed in 3.4.5

3.4.3

16 Aug 19:59
09a364b
Compare
Choose a tag to compare
  • Fixed more deprecation warnings for types used for compatibility with Flutter apps using Flutter < 1.12.
    #235

3.4.2

13 Aug 20:05
a867ee6
Compare
Choose a tag to compare
  • Fixed deprecation warnings for types used for compatibility with Flutter apps using Flutter < 1.12.
    #232
  • Bumped purchases-hybrid-common to 1.8.2. Changelog here
    #233

amazon.alpha.1

30 Jul 10:20
Compare
Choose a tag to compare
amazon.alpha.1 Pre-release
Pre-release

Adds initial Amazon store support. In order to use please point to this tag in your pubspec.yaml like this:

dependencies:
  purchases_flutter:
    git:
      url: git://github.com/revenuecat/purchases-flutter.git
      ref: amazon.alpha.1

Then configure the package using your RevenueCat API key specific for Amazon and passing useAmazon: true:

await Purchases.setup(apiKey, appUserId: null, observerMode: false, useAmazon: true);

Modify your android/app/build.gradle to add a dependency to the official in-app-purchasing-2.0.76.jar

dependencies {
    implementation files('libs/in-app-purchasing-2.0.76.jar')

The next step would be to add the jar to your project. For that you can use the following gradle task that can be added to android/app/build.gradle and run via ./gradlew getAmazonLibrary or via Android Studio :

// Gradle task to download Amazon library
ext {
    iapVersion = "2.0.76"
}

task getAmazonLibrary {
    ext {
        downloadURL = "https://amzndevresources.com/iap/sdk/AmazonInAppPurchasing_Android.zip"
        fileToExtract = "in-app-purchasing-${iapVersion}.jar"
        destFile = new File( projectDir, "libs/$fileToExtract" )
    }

    inputs.property( 'downloadURL', downloadURL )
    inputs.property( 'fileToExtract', fileToExtract )
    outputs.file( destFile )

    doLast {
        File destDir = destFile.parentFile
        destDir.mkdirs()

        File downloadFile = new File( temporaryDir, 'download.zip' )
        new URL( downloadURL ).withInputStream { is ->
            downloadFile.withOutputStream { it << is }
        }

        project.copy {
            from {
                zipTree(downloadFile).matching { include "**/$fileToExtract" }.singleFile
            }

            into( destDir )
        }
    }
}

That gradle task will add the jar to the libs folder inside app:

I in-app-purchasing-2 0 76 jar

Alternatively, you can do this manually by downloading the .zip from Amazon and then unzipping and moving the in-app-purchasing-2.0.76.jar into your projects android/app/libs/ folder like in the screenshot above.

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.

3.4.1

29 Jul 18:56
532af87
Compare
Choose a tag to compare
  • Fixed a bug where the wrong error code would be returned when mapping to JSON in Android.
  • Bumped purchases-hybrid-common to 1.8.1. Changelog here
    #225

3.4.0

21 Jul 16:17
b953f12
Compare
Choose a tag to compare

3.4.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

  • deprecates createAlias in favor of logIn.
  • deprecates identify in favor of logIn.
  • deprecates reset in favor of logOut.
  • deprecates setAllowSharingStoreAccount in favor of dashboard-side configuration.
    #180

Other