Migrate to SDK v4.0.0
Introducing Promotional offers
Initialization update
import Purchasely
Purchasely.start(withAPIKey: "API_KEY",
appUserId: "USER_ID",
runningMode: .full,
paywallActionsInterceptor: PLYPaywallActionsInterceptor,
storekitSettings: .storeKit2, // Set your StoreKit version
logLevel: .debug, // set to warning or error for release
initialized: PLYSuccessErrorClosure))
// Paywall interceptor can be setted afterwards by calling
Purchasely.setPaywallActionsInterceptor { [weak self] (action, parameters, presentationInfo, proceed) in
}
// Set your ui listener
Purchasely.Purchasely.setUIDelegate(PLYUIDelegate?)
#import <Purchasely/Purchasely-Swift.h>
[Purchasely startWithAPIKey:@"API_KEY"
appUserId:@"USER_ID"
runningMode: PLYRunningModeFull
paywallActionsInterceptor:nil
storekitSettings: [StorekitSettings .storekit2] // optional but set to StoreKit 2 by default.
// Fallsback to StoreKit 1 in case the informations are not setup correctly on Purchasely console
logLevel: LogLevelInfo
initialized: nil];
// Paywall interceptor can be setted afterwards by calling
[Purchasely setPaywallActionsInterceptor:^(enum PLYPresentationAction, PLYPresentationActionParameters * _Nullable, PLYPresentationInfo * _Nullable, void (^ _Nonnull)(BOOL)) {
}];
// Set your ui listener
[Purchasely setUIDelegate:(id<PLYUIDelegate> _Nullable)Update for deeplinks
Methods for presentation display
Fetch presentation with context (Android only)
Use Views instead of Fragments (Android only)
Update Purchase method
Purchase methodLast updated