Releases: RevenueCat/react-native-purchases
4.5.3
- Fix warnings regarding
new NativeEventEmitter()
being called without the requiredaddListener
andremoveListeners
methods, which fixes this issue
4.5.2
- Fix an issue where calling
checkTrialOrIntroductoryPriceEligibility
could cause a log in prompt - Bump
purchases-hybrid-common
to 2.0.1. Changelog here - Bump
purchases-ios
to 3.14.1. Changelog here) - Bump
purchases-android
to 4.6.1. Changelog here
#329
4.5.1
4.5.0
This release has some changes that should help prevent "There is no singleton instance" errors issue, PR.
- Added
isConfigured
function to be able to check if the instance of Purchases has been configured before calling any function that accesses the singleton instance. - These functions that were returning
void
, now returnPromise<void>
:
Integrations | Subscriber attributes | Configuration and other |
---|---|---|
addAttributionData |
collectDeviceIdentifiers |
invalidatePurchaserInfoCache |
setAd |
setAttributes |
presentCodeRedemptionSheet |
setAdGroup |
setDisplayName |
setAllowSharingStoreAccount |
setAdjustID |
setEmail |
setAutomaticAppleSearchAdsAttributionCollection |
setAirshipChannelID |
setPhoneNumber |
setDebugLogsEnabled |
setAppsflyerID |
setPushToken |
setFinishTransactions |
setCampaign |
setSimulatesAskToBuyInSandbox |
|
setCreative |
syncPurchases |
|
setFBAnonymousID |
||
setKeyword |
||
setMediaSource |
||
setMparticleID |
||
setOnesignalID |
-
Accessing a function that accesses the singleton instance before it has been setup will now reject with a
UninitializedPurchasesError
. -
Bump
purchases-hybrid-common
to1.11.1
Changelog here -
Bump
purchases-ios
to3.13.1
(Changelog here) -
Bump
purchases-android
to4.6.0
(Changelog here)
4.4.1
What's Changed
- Fix types of
getAppUserId
by @TimPetricola in #306 - Add fastlane by @taquitos in #269
New Contributors
- @TimPetricola made their first contribution in #306
- @taquitos made their first contribution in #269
Full Changelog: 4.4.0...4.4.1
4.4.0
4.4.0
- Bump
purchases-hybrid-common
to1.10.0
Changelog here - Bump
purchases-ios
to3.13.0
(Changelog here) - Bump
purchases-android
to4.4.0
(Changelog here) - Added support for Airship integration via
setAirshipChannelID
#307
4.3.3
- Bump
purchases-ios
to 3.12.8
3.12.8 Changelog here
3.12.7 Changelog here
3.12.6 Changelog here
3.12.5 Changelog here
3.12.4 Changelog here - Bump
purchases-android
to 4.3.3
4.3.3 Changelog here
4.3.2 Changelog here
4.3.2
4.3.1
- Bumped purchases-android to 4.3.1 Changelog here,
which fixes canMakePayments not returning (see related issue: RevenueCat/purchases-unity#61) - Bumped purchases-ios to 3.12.3 Changelog here
- Bumped purchases-hybrid-common to 1.9.1 Changelog here
- Extracted readableErrorCode to userInfo (#268)
amazon.alpha.1
Adds initial Amazon store support. In order to use please point to this tag in your package.json
like this:
"react-native-purchases": "RevenueCat/react-native-purchases#amazon.alpha.1"
Then configure the package using your RevenueCat API key specific for Amazon and passing useAmazon: true
:
Purchases.setup({apiKey: "api_key", useAmazon: true});
Please note that the setup call has changed and now accepts an object. This is to be able to use named arguments.
Check your android/app/build.gradle
to make sure there is a dependency on everything included in the libs
folder. React Native adds this by default:
dependencies {
implementation fileTree(dir: "libs", include: ["*.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
in the android folder of your project 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
:
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.