Migrate to SDK v3.0

Purchasely SDK v3.0 brings a lot of new amazing features:

It also removes the following:

Update start method

The start method changes:

  • the observerMode parameter is replaced by a more comprehensive runningMode

  • the confirmPurchaseHandler parameter is replaced by paywallActionsInterceptor

Grab new events and properties

Expect null controllers / fragments

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:

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:

Last updated

Was this helpful?