Migrate to SDK v3.0
Purchasely SDK v3.0 brings a lot of new amazing features:
New running modes
Paywall actions interceptor to intercept and override every paywall action
New event properties to provide you with even more contexts
It also removes the following:
Purchase interceptor and login handler are removed and replaced by the paywall actions interceptor
UI Events properties changed
Update start method
start methodThe start method changes:
the
observerModeparameter is replaced by a more comprehensiverunningModethe
confirmPurchaseHandlerparameter is replaced bypaywallActionsInterceptor
Grab new events and properties
Expect null controllers / fragments
null controllers / fragmentsEven if you don't use observer mode or new modes you will have to adapt your code
Some of the new modes block the display of the paywall. In that case the paywall is not returned. This is the reason why the following methods are not returning optionals:
productController
planController
presentationController
Migrate the Purchase interceptor
Purchase interceptor was used to trigger app specific code before triggering the purchase using Purchasely.
It could be used to display specific terms and conditions, present a parental gate or perform a purchase using your own code or a third party subscription tool.
If you are using Purchase interceptor you probably have some code like that:
it should be changed to something like that:
If your are intercepting several actions (purchase, login, …) you must add a case and should only have one call to Purchasely.setPaywallActionsInterceptor
Migrate the Login interceptor
Every presentation, has an Already subscribed? Sign-in button to let your customers connect to unlock a feature / access a content.
To intercept the tap on this button you had to use the loginTappedHandler interceptor
With SDK v3 this feature is moved to the paywall actions interceptor and your code should change to something like that:
If your are intercepting several action (purchase, login, …) you must add a case and should only have one call to Purchasely.setPaywallActionsInterceptor
Last updated
Was this helpful?