Releases: adaptyteam/AdaptySDK-React-Native
v2.3.1
v2.3.0
- 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 forremoteConfig
- Added activation call memoization to avoid
alreadyActivated
error while hot reloading (#42)
v2.2.1
v2.2.0
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 optionsAdaptyErrror.prefix
that prepends a string to all error logsAdaptyError.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 runtimeadapty.getPaywall
is now instead ofgetPaywalls
adapty.getPaywallProducts
fetches a list of products for a provided paywalladapty.logShowOnboarding
a separate API for onboarding screens
Removed API
Methods
adapty.paywalls.getPaywalls
is replaced withadapty.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
v1.4.0
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
v1.3.0
v1.2.1
v1.2.0
Changes β¨
- π₯ BREAKING | Android now supports
localizedSubscriptionPeriod
forAdaptyProduct
andAdaptyProductDiscount
, Thus, all casesproduct.ios.localizedSubscriptionPeriod
must now be replaced withproduct.localizedSubscriptionPeriod
- iOS events now work properly. There are only two left now:
onInfoUpdate
andonPromoReceived
. 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 asimport { 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