Skip to content

Releases: adaptyteam/AdaptySDK-React-Native

v2.3.1

07 Feb 18:23
Compare
Choose a tag to compare
  • Fixed a bug that caused a new anonymous user to be created when migrating from earlier versions of the SDK.

v2.3.0

01 Feb 09:46
Compare
Choose a tag to compare
  • Added an option to specify the paywall locale
    ❗️Please note that you should enable this feature in the dashboard, in other case the SDK will not receive any values for remoteConfig
  • Added activation call memoization to avoid alreadyActivated error while hot reloading (#42)

v2.2.1

23 Jan 21:01
7b298fd
Compare
Choose a tag to compare

If you haven't yet migrated to v2, check out the release.

  • Fixed a bug with AdaptyProduct.subscriptionPeriod being a required field, while being null for consumable products (#40)

v2.2.0

21 Jan 08:37
Compare
Choose a tag to compare

Meet the second version of the Adapty SDK πŸŽ‰
See our what's new and migration guide for API updates.

Why not 2.0.0

Since SDK v2 Adapty has decided to sync vX.X._ versioning across platforms. The reason for that is because all cross-platform solutions (like React Native) are made as native SDK proxies. If iOS native SDK v2.2.0 adds integration with Firebase and Google Analytics, then next React Native version would most likely add the same feature by bridging the new native code to JS.
It used to be a hassle on v1! We needed to remember, what native versions React Native implemented on version v1.x.x. It well could be that RN v1.2.1 implemented iOS v1.4.6 and Android v1.3.12. Navigating in those is a pure nightmare! Now first two numbers will guarantee a set of features. If native iOS v2.2.x has something, then native android v2.2.x and React Native v2.2.x also must have the same feature set. This syncing also would provide a huge relief on structuring our documentation and our support team.

Updates

The SDK has been effectively rewritten, hence it is meaningless to write changes. We strongly advise you to check migration guide or a new API reference.
Migration guide does not list all the changes, you may scroll through v2 documentation for more details.

Features

  • Instead of getting all paywalls in one request with the .getPaywalls(), it must be done separately for each paywall using .getPaywall("<paywallId>")
  • Added integration with Firebase and Google Analytics. Read more.
  • Added apiKey check on activate (there will be full reset if you change your apiKey without app reinstall)
  • Added integration with OneSignal. Read more.
  • Added integration with Pushwoosh. Read more.
  • The forceUpdate parameter was removed from the getPaywall method. The result will always be up to date if it is possible to retrieve data from the server
  • Experimental waitUntilActive mutex
  • It is no longer possible to use products outside of the paywall. If you need to handle a product, create a separate paywall for it (or for multiple products)
  • AdaptyError more informative logging. Error code list filtered
  • Type-safe bridging interfaces
  • introductoryOfferEligibility – instead of true/false we give a more extended list of options
  • AdaptyErrror.prefix that prepends a string to all error logs
  • AdaptyError.onError that pipes all errors to one place
  • JS objects, that work as TypeScript string unions for purists

Renames

Methods

  • activateAdapty β†’ adapty.activate
  • adapty.profile.identify β†’ adapty.identify
  • adapty.purchases.getInfo β†’ adapty.getProfile
  • adapty.profile.update β†’ adapty.updateProfile
  • adapty.profile.logout β†’ adapty.logout
  • adapty.paywalls.logShow β†’ adapty.logShowPaywall
  • adapty.paywalls.setFallback β†’ adapty.setFallbackPaywalls
  • adapty.purchases.makePurchase β†’ adapty.makePurchase
  • adapty.purchases.setVariationId β†’ adapty.setVariationId
  • adapty.purchases.restore β†’ adapty.restorePurchases
  • adapty.promo.presentCodeRedemptionSheet β†’ adapty.presentCodeRedemptionSheet

Types

  • AdaptyPurchaserInfo β†’ AdaptyProfile
  • AdaptyProfile β†’ AdaptyProfileParameters
  • AdaptyPaidAccessLevelsInfo β†’ AdaptyAccessLevel
  • AdaptyNonSubscriptionsInfo β†’ AdaptyNonSubscription
  • AdaptySubscriptionsInfo β†’ AdaptySubscription
  • AdaptyOfferType β†’ OfferType
  • AdaptyVendorStore β†’ VendorStore
  • AdaptyProductSubscriptionPeriod β†’ AdaptySubscriptionPeriod

Events

  • onInfoUpdate β†’ onLatestProfileLoad

Added API

  • adapty.setLogLevel to change log level in runtime
  • adapty.getPaywall is now instead of getPaywalls
  • adapty.getPaywallProducts fetches a list of products for a provided paywall
  • adapty.logShowOnboarding a separate API for onboarding screens

Removed API

Methods

  • adapty.paywalls.getPaywalls is replaced with adapty.getPaywall
  • adapty.promo.canPresentCodeRedemptionSheet
  • adapty.promo.getPromo
  • adapty.getApnsToken
  • adapty.setApnsToken

Events

  • onPromoReceived

Under the hood

  • The bridge layer was rewritten from scratch
  • The server interaction layer was rewritten from scratch
  • The initial request sequence has been optimized and simplified
  • Reduced the number of API calls made by SDK. Some of the request are now faster and transfer less data
  • Independent requests can be executed simultaneously
  • StoreKit interaction layer was refactored

Full documentation can be found in here.

v1.4.1

12 Dec 16:07
Compare
Choose a tag to compare
  • Android observer mode support
  • (#35) Fix access violation to ambiguous error codes. Only valid android error codes remains

v1.4.0

05 Dec 13:05
Compare
Choose a tag to compare

Breaking πŸ”₯πŸ§‘πŸ»β€πŸš’πŸ”₯

  • You need to run adapty.paywalls.logShow() before calling a purchase method inside a paywall

Features πŸ¦„

  • Stability improved
  • AdaptyError now extends JS Error (#31)
  • adapty.paywalls.logShow() now resolves (#33)
  • Deprecated RN setup dependency.asset removed (#26)
  • iOS library bump: 1.16.8 -> 1.17.7
  • Android library bump: 1.9.0 -> 1.12.0
  • Typescript builds now targets ES5
  • React Native warnings resolved
  • Docs & Readme updated
  • More IntelliSense support (Even more to come in v2.0)
  • More AdaptyErrors are now handled as codes (won't be unknown)
  • New example apps, that would work nicely for your testing purposes: SubscriptionsJS and SubscriptionsExpo
  • Previous example app deprecated

Also installation process for Expo can be found in docs now: https://docs.adapty.io/v1.0/docs/react-native-installation

v1.3.4

21 Dec 10:34
Compare
Choose a tag to compare
  • Added profileId to AdaptyPurchaserInfo

iOS bump 1.16.7 -> 1.16.8
Android bump 1.6.1 -> 1.7.0

v1.3.0

03 Dec 11:04
Compare
Choose a tag to compare
  • Added iOS deferred purchases

v1.2.1

16 Nov 05:27
Compare
Choose a tag to compare
  • Fixes iOS break during build

v1.2.0

15 Nov 13:18
Compare
Choose a tag to compare

Changes ✨

  • πŸ”₯ BREAKING | Android now supports localizedSubscriptionPeriod for AdaptyProduct and AdaptyProductDiscount, Thus, all cases product.ios.localizedSubscriptionPeriod must now be replaced with product.localizedSubscriptionPeriod
  • iOS events now work properly. There are only two left now: onInfoUpdate and onPromoReceived. In both cases TypeScript support was expanded in such a way, that second argument would grab an according callback type (i.e. ('onInfoUpdate', (data: PurchaserInfo) => void | Promise<void>) => Subscription)
  • AdaptyError can now be imported from the root as import { AdaptyError } from 'react-native-adapty'
  • Now you can use"all" logLevel during initialisation
  • Now you can use adapty.promo.canPresentCodeRedemptionSheet(): boolean to verify whether a device is compatible with codeRedemptionSheet

iOS native bump 1.13.2 -> 1.16.4
Android native bump 1.4.0 -> 1.6.0