Releases: adaptyteam/AdaptySDK-React-Native
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
v1.0.0-4: BREAKING
Changes π₯
You may find full changelog here.
AdaptyProduct
andAdaptyProductDiscount
now separate ios and android featuresmakePurchase
now supports iOS offersmakePurchase
now supports AndroidsubscriptionUpdateParam
- Promo push notifications support added
setFallbackPaywall
added- Bundle decreased 1.94Mb -> 850kb
- Contribution Guide added
- New Types and IntelliSense docs
updateAttribution
now requiresnetworkUserId
to workAdaptyProductSubscriptionPeriod
now displays unit as textday
,week
etc.- TypeScript 4.3 features support
AdaptyUser
->AdaptyProfile
, same with sdk- fixes
Migration guide π§βπ
After updating the library don't forget to update Pods cd ios && pod install
(on error pod update Adapty
) and re-sync gradle settings for Android
AdaptyProduct
Now OS-based fields are separated. Please check all returns of adapty.purchases.makePurchase()
(returns product amongst keys) and adapty.paywalls.getPaywalls()
(returns products separately and inside each paywall)
export interface AdaptyProduct {
vendorProductId: string;
subscriptionPeriod: AdaptyProductSubscriptionPeriod;
- localizedSubscriptionPeriod: string;
- regionCode: string;
- isFamilyShareable?: boolean;
- discounts: AdaptyProductDiscount[];
- promotionalOfferEligibility: boolean;
- subscriptionGroupIdentifier: string;
- promotionalOfferId?: string;
- freeTrialPeriod?: AdaptyProductSubscriptionPeriod;
introductoryDiscount?: AdaptyProductDiscount;
introductoryOfferEligibility: boolean;
price: number;
currencySymbol: string;
localizedDescription: string;
localizedTitle: string;
localizedPrice: string;
variationId?: string;
currencyCode: string;
paywallName?: string;
paywallABTestName?: string;
+ android?: {
+ freeTrialPeriod?: AdaptyProductSubscriptionPeriod;
+ };
+ ios?: {
+ promotionalOfferEligibility: boolean;
+ isFamilyShareable: boolean;
+ discounts: AdaptyProductDiscount[];
+ promotionalOfferId?: string;
+ subscriptionGroupIdentifier?: string;
+ localizedSubscriptionPeriod?: string;
+ regionCode?: string;
+ };
}
AdaptyProductDiscount
Now OS-based fields are separated. Please check all returns of adapty.purchases.makePurchase()
(returns product amongst keys) and adapty.paywalls.getPaywalls()
(returns products separately and inside each paywall)
export interface AdaptyProductDiscount {
subscriptionPeriod: AdaptyProductSubscriptionPeriod;
price: number;
localizedPrice: string;
numberOfPeriods: number;
- paymentMode: number;
- identifier: string;
- localizedSubscriptionPeriod: string;
- localizedNumberOfPeriods: number;
+ ios?: {
+ localizedNumberOfPeriods: number;
+ localizedSubscriptionPeriod: string;
+ paymentMode: string;
+ identifier: string;
+ };
}
AdaptyProductSubscriptionPeriod
Check if you have .subscriptionPeriod.unit
or .freeTrialPeriod.unit
, these values are now strings instead of enum and passed as day
, week
, month
, year
makePurchase()
if you have passed offerId
as a second argument, now it is done in the other fashion:
adapty.purchases.makePurchase(product: AdaptyProduct, {
ios?: {offerId?: String},
android?: {subscriptionUpdateParam?: SubscriptionUpdateParam}
});
updateAttribution()
updateAttribution
now requires networkUserId
arg. Now interface is this: updateAttribution( networkUserId: string, attribution: Object, source: 'Adjust' | 'AppsFlyer' | 'Branch' | 'Custom' | 'AppleSearchAds')
adapty.user
and AdaptyUser
to adapty.profile
and AdaptyProfile
Check all occurrences of adapty.user
and change them to adapty.profile
, also adapty.user.updateProfile()
is adapty.profile.update()
now. If you have imported AdaptyUser
, it should be renamed to AdaptyProfile
v0.6.4
v0.6.3
Features π€ΈββοΈ
- Android: and iOS request gzipping
- iOS: Added retry for createProfile request in case of poor connection or if a server is down
- Android: getPaywalls method enhanced
Fixes π©βπ§
- Android:
updateAttribution
method could panic - iOS: passing
facebookAnonymousId
toupdateProfile
could panic - default flags for AdaptyProducts were set, thus causing empty fields to be filled with false-positive values
iOS version 1.12.3 -> 1.12.4
Android 0.8.7 -> 0.8.9
v0.6.0
Features π€ΈββοΈ
- Documentation!
- Added method
adapty.setIsExternalAnalyticsEnabled (boolean)
lets you enable/disable automatic adapty analytics feature - For the method
adapty.users.updateProfile({})
facebookAnonymousId
can now be passed - Added method
adapty.purchases.setVariationId()
lets you associate transaction with an AdaptyPaywall name
andabTestName
added toAdaptyPaywall
Fixes π©βπ§
βundefinedβ
customerUserID when no value is passed- Kotlin Boolean conversion could produce true on empty field
iOS version 1.12.1 -> 1.12.3
Android 0.8.4 -> 0.8.7
BREAKING: v0.5
βοΈ BREAKING βοΈ
- Now methods with caching option like
adapty.paywalls.getPaywalls({caching: true})
expect you to useforceUpdate: true
flag instead. Default value isfalse
. Example:const info = await adapty.purchases.getInfo({ forceUpdate: true })
adapty.purchases.makePurchase(...)
now takesproduct: AdaptyProduct
as an argument, that way Adapty ensures that a product includes all special offers from the exact paywall it was requested fromadapty.purchases.makePurchase(...)
now remembers paywall you've fetched and doesn't need{caching: true}
flag any longer. New interface ismakePurchase(product: AdaptyProduct)
adapty.purshases.validateReceipt
was removed
π« Non-breaking features π«
- Errors now provide an extensive information on a problem. All errors thrown by Adapty are now wrapped by AdaptyError class with interface . You can find the full list of
adaptyCode
s here.
interface AdaptyError {
// HTTP status code
code: number;
// certain string values to define the nature of a problem
adaptyCode: "unknown" | "noProductsFound" | .... ;
// User-friendly text, which can be displayed as a message
localizedDescription: string;
}
- Now you can get and set APNS token via
adapty.getApns()
andadapty.setApns(value: string)
methods - Types are now much more exact. Types, that doesn't have both android and iOS representations are now dubbed with
@todo NO VALUE ANDROID
string within tsdoc adapty.paywalls.getPaywalls()
now returnscustomPayloadString
β stringed JSON representation of a Custom Payload fieldadapty.paywalls.logShow(variationId)
is now available. Gives a developer full control over paywall analytics
π¨βπ§ Fixes π¨βπ§
- Within
makePurchase
method bothlocalizedPrice
andprice
values are passed without mutation (#1)
Adapty Android SDK 0.6.0 -> 0.8.4
Adapty iOS SDK 1.9.1 -> 1.12.1