Skip to content

4.3.0

Choose a tag to compare

@kupriyanovNik kupriyanovNik released this 09 Nov 22:14
4c2c981

⚠️ Breaking Changes

  • [Android] Google Play in-app messages, such as payment decline notices, are now shown by default: the SDK asks Google Play for them each time an activity starts after Adapty().activate(), including when the app returns to the foreground and when an AdaptyUI flow or onboarding is presented or dismissed, so a message can appear over a paywall. An activity that started before activate() does not count, so to show the messages at launch, call Adapty().showStoreMessages() on Android once after activate(); on iOS below 16 that call fails. To keep the previous behavior, activate with .withStoreMessagesHandling(AdaptyStoreMessagesHandling.manual) on Android only: on iOS 16 and later, manual also holds App Store messages until you call Adapty().showStoreMessages().
  • [Android] Whole-number parameters of flow analytic events reach flowViewDidReceiveAnalyticEvent and AdaptyUIFlowPlatformView.onDidReceiveAnalyticEvent as int instead of double. Read numeric parameters as num.
  • Email fields of an onboarding reach onboardingViewOnStateUpdatedAction and AdaptyUIOnboardingPlatformView.onStateUpdatedAction as AdaptyOnboardingsEmailInput; before, they arrived as AdaptyOnboardingsTextInput. Handle AdaptyOnboardingsEmailInput too.
  • Printing AdaptyOnboardingsInputParams or an AdaptyOnboardingsInput now shows the entered value, so review any logging of them.

🚀 New

  • [iOS] Monthly billing with a 12-month commitment (iOS 26.4+, apps built with Xcode 26.5+): AdaptyProductSubscription.pricingTerms describes the plan, Adapty().makePurchase() buys it, and AdaptyErrorCode.billingPlanUnavailable reports a plan that can't be bought. For such a product, AdaptyPaywallProduct.price and subscription.period (and localizedPeriod) cover the whole commitment; show the installment from pricingTerms.billingPrice and pricingTerms.billingPeriod. Read how 12-month commitment plans work and how to set one up.
  • AdaptyAccessLevel and AdaptySubscription report billingPlan and, for a commitment plan, commitmentInfo. AdaptySubscription.billingPlan is upFront for a subscription bought without a commitment plan, including every Google Play purchase.
  • Store messages: with .withStoreMessagesHandling(AdaptyStoreMessagesHandling.manual) on AdaptyConfiguration, App Store and Google Play messages are shown only when you call Adapty().showStoreMessages(). On iOS this works on iOS 16 and later; below that, StoreKit shows App Store messages itself.
  • [iOS] Adapty().getPendingStoreMessageTypes() returns the types of the held messages, and Adapty().showStoreMessages(iosFilter: ...) shows only the given AdaptyStoreMessageTypes.
  • [iOS] Adapty().showStoreMessages() can fail with the new AdaptyErrorCode.operationInProgress and AdaptyErrorCode.resolverFailure.
  • Adapty().preloadFlows() and Adapty().preloadFlowsForDefaultAudience() load flows into the cache, so that Adapty().getFlow() or Adapty().getFlowForDefaultAudience() with AdaptyFlowFetchPolicy.returnCacheDataElseLoad, or with returnCacheDataIfNotExpiredElseLoad while the cached flow is not older than maxAge, returns them without a network request. On a test device both getters skip the cache and load from the network, falling back to the cached flow only if that request fails.
  • AdaptyUI().destroyFlowView() and AdaptyUIFlowView.destroy() release a view that was never presented, a view kept alive by dismiss(destroy: false), or one the user swiped down when it was presented as a page sheet on iOS.
  • AdaptyFlow.variationName returns the name of the flow's variation.
  • [Android] Flows: the hero cover moves with a parallax effect when the screen scrolls.
  • [Android] Flows: the footer background of hero and flat screens shows only while content is beneath it.
  • [iOS] Flows open faster: their products load while the flow is being prepared.
  • Flows: product texts can show the installment price and period of a monthly plan with a 12-month commitment; for other products, and on Google Play, they show the regular price and period.
  • [iOS] Adapty().reportTransaction() takes an optional appleJwsTransaction: in Observer mode, pass the JWS of the reported StoreKit 2 transaction when your purchase library provides it.

🩹 Fixed

  • offerId of AdaptyAccessLevel and AdaptySubscription was always null on iOS, and activePromotionalOfferId was always null on Android.
  • .withLogLevel() on AdaptyConfiguration also sets the level of the logs this package prints.
  • Adapty().activate() keeps a level set with Adapty().setLogLevel() before it, unless the configuration sets one with .withLogLevel().
  • Number fields of an onboarding reach onboardingViewOnStateUpdatedAction and AdaptyUIOnboardingPlatformView.onStateUpdatedAction as AdaptyOnboardingsNumberInput. Before, their updates never arrived.
  • [Android] When Adapty's server answered with an error while validating the purchase of a consumable product bought in a flow or with Adapty().makePurchase(), the SDK acknowledged the purchase instead of consuming it, so the product could stay owned and not be bought again.
  • [iOS] The promotional offer of a product, in AdaptyPaywallProduct.subscription.offer and in flows, is selected only for a user who has had an auto-renewable subscription in the app; other users get the introductory offer, if they are eligible, or no offer. Before, the SDK did not check this on the device.
  • [Android] A pending purchase made with Adapty().makePurchase() or in a flow is validated once Google Play approves it: right away if the app is running, otherwise when it returns to the foreground. Before, it waited for the next activation.
  • [Android] Unless Observer mode is on, other purchases are synced when Google Play reports them and, at most once a minute, when the app returns to the foreground. Before, they waited for the next activation.
  • [Android] Adapty().makePurchase(), or a purchase in a flow, could wait forever when Google Play reported a purchase of another product while it was in progress. Now it completes with the requested product's purchase if Google Play has one, as AdaptyPurchaseResultPending if that purchase is pending, or as AdaptyPurchaseResultUserCancelled if not.
  • [Android] With .withGoogleLocalAccessLevelAllowed(true), Adapty().didUpdateProfileStream delivered only the first profile update after launch.
  • [iOS] currencySymbol of the price of a subscription offer phase (subscription.offer.phases of AdaptyPaywallProduct and AdaptyPromotedProduct) was always null.
  • [Android] AdaptyPaywallProduct.paywallProductIndex was always 0, so a web paywall opened for a product got the first product's index.
  • [iOS] Crashes while choosing the A/B test variation of a flow or onboarding, in a flow showing the same product on several screens, in a flow date picker with an out-of-range value, and in a flow script producing NaN or an infinite number.
  • [Android] Flows: a product used more than once with different offers could get the wrong offer, taps did not reach elements in the cover of a scrollable screen, and other fixes.
  • [iOS] Flows: slow or frozen heavy screens, black screens on iOS 16 and earlier, gradient border thickness and conic gradient start angle, bold or semibold fonts rendering as regular, and other fixes.

❗️ Don't forget to update your local fallback file if needed.

Full Changelog: 4.1.1...4.3.0