v4.0.3
✨ New Features
onAppeared now tells which view appeared and in which locale
The flow onAppeared handler used to be called with no arguments. It now receives the presented view, including locale
import { AdaptyFlowView } from 'react-native-adapty';
<AdaptyFlowView
flow={flow}
params={{ locale: 'es' }}
onAppeared={view => {
console.log(view.locale); // 'es', or the flow's default localization
}}
/>;Fixes
- (iOS) Fixed a decoding failure that broke an entire paywall or onboarding configuration when a text element had a background.
- (android) Various UI rendering fixes.
Improvements
- (android)
restorePurchases()no longer rejects when there is nothing to restore. It now resolves with the currentAdaptyProfileinstead of failing withnoPurchasesToRestore(1004) — check the access level status in the returned profile. ThenoPurchasesToRestoreerror code is deprecated.